This is a PHP script for counting and displaying simple statistics data of website traffic. Records and displays number of site visits and unique visitors, in the current and previous day, the number of online visitors in the last 60 seconds; as well as the top visits, visitors and record of online visitors, also, the IP of the current visitor.
The script is created with PHP. The traffic data can be saved in a text file on the server, or into a MySQL database (using PDO).
This script not records the accesses of bots engines (Googlebot, alexa, crawler, Gigabot, msn, ..., and others, total of 170 bots), and it can be included in both ".php" and ".html" files (but the server must run PHP).
It has been tested successfully on localhost (with XAMPP) and on the server of CoursesWeb.net, with Mozilla Firefox, Internet Explorer, Google Chrome and Opera.
- Details about Installation and Settings you'll find in "Read.html" file, in the archive with the script.
<ul> <li>http://coursesweb.net/html/</li> <li>http://coursesweb.net/css/</li> </ul>
.some_class { display: list-item; }
var obj = { "courses": ["php", "javascript", "ajax"] }; var jsonstr = JSON.stringify(obj); alert(jsonstr); // {"courses":["php","javascript","ajax"]}
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>'; $dochtml = new DOMDocument(); $dochtml->loadHTML($strhtml); $elm = $dochtml->getElementById("dv1"); echo $elm->nodeValue; // CoursesWeb.net