|
|
 |
This is a Hit counter to keep track on Your visitors.
The script counts every visit for each page Your call the script from.
The information is stored into a MySQL database.
From this database You can create statistics. I created this script because
My service provider doesn't provide me with the tools to check the number of visitor per sub domain
Current release 1.0
|
|
 |
Welcome for the first time today on this page
You requested this page ( http://www.scribax.com/hitCount.php ) on 2009-07-04 at 07:17:13 Your IP-address is : 38.103.63.56 Your country code is : en-us,en;q=0.5 Your came from :
These variables can be stored in a database to extract information for ie a Hit Counter.
A "Hit" is set every time a visitor (re)loads a page. To calculate the number of unique visitor per day only one occurrence of each IP address for that day is used. Storing the information in a certain way in the database makes it possible to use this information for a simple Hit Counter. The next step can then be to convert the number to as string an replace each character with its corresponding image.
This script provides the way to store the IP address for each visitor per day. The results can be
shown like this
Read the install file for more information
|
|
 |
| 2009-07-04 | 07:17:13 | www.scribax.com | /hitCount.php | en-us,en;q=0.5 | 1 | | 2008-11-22 | 03:50:50 | www.scribax.com | /index.php | en-us,en;q=0.5 | 1 |
That's all I have in My database
|
|
 |
Some useful $_SERVER variables are listed below with an example of the result (if available)
'PH_SELF' (/hitCount.php) The filename of the currently executing script, relative to the document root.
'REQUEST_METHOD' (GET) Which request method was used to access the page; ie 'GET', 'HEAD', 'POST', 'PUT'.
'QUERY_STRING' () The query string, if any, via which the page was accessed.
'HTTP_ACCEPT_LANGUAGE' (en-us,en;q=0.5) Contents of the Accept-Language: header from the current request, if there is one. Example: 'en'.
'HTTP_HOST' (www.scribax.com) Contents of the Host: header from the current request, if there is one.
'HTTP_USER_AGENT' (CCBot/1.0 (+http://www.commoncrawl.org/bot.html)) The web browser You are using. This is a string denoting the user agent being which is accessing the page. You can use this value with get_browser() to tailor your page's output to the capabilities of the user agent.
'REMOTE_ADDR' (38.103.63.56) The IP address from which the user is viewing the current page.
'REQUEST_URI' (/hitCount.php) The URI which was given in order to access this page; for instance, '/index.html'.
|
|
 |
|
|
 |
|
|
 |