The AXS visitor tracking software has been highly recommended by Chris and others on this forum. It comes with a default javascript module code you place on each page of your site.
Below you will find Chris' PHP module code for AXS. Among its advantages over the javascript is the ability to track search engine spiders as they crawl your site. I find this to be a huge benefit. Note that you do loose the ability to not log your visits using this technique. Chris agreed it could be posted in the forum so here it is... enjoy:
PHP Code:
if ($_COOKIE['axs_no_log'] != "1") {
$AXSLogFile = '/full/path/to/log.txt';
$AXSTimeOffsetInHours = +1;
$AXSdomain = 'http://www.yourdomain.com';
$AXSuri = $_SERVER['REQUEST_URI'];
$AXSrad = $_SERVER['REMOTE_ADDR'];
$AXSREMOTE_HOST = @getHostByAddr($AXSrad);
$AXSFrom = $_SERVER['HTTP_REFERER'];
$AXSTo = $AXSdomain.$AXSuri;
$AXSHTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
$AXSunixtime = time() + (3600*$AXSTimeOffsetInHours);
$AXSsecond = date("s", ($AXSunixtime))+0;
$AXSminute = date("i", ($AXSunixtime))+0;
$AXShour = date("G", ($AXSunixtime))+0;
$AXSday = date("j", ($AXSunixtime))+0;
$AXSmonth = date("n", ($AXSunixtime))-1;
$AXSyear = date("y", ($AXSunixtime))+100;
$AXSwday = date("w", ($AXSunixtime))+0;
$AXSyday = date("z", ($AXSunixtime))+0;
$AXSlogline =
"|$AXSREMOTE_HOST|$AXSrad|$AXSFrom|$AXSTo|$AXSHTTP_USER_AGENT|$AXSsecond|$AXSminute|$AXShour|$AXSday|$AXSmonth|$AXSyear|$AXSwday|$AXSyday|\n";
$AXSfile = fopen("$AXSLogFile", "a");
flock($AXSfile, 2);
fwrite($AXSfile, "$AXSlogline");
flock($AXSfile, 3);
fclose($AXSfile);
}
*** Be sure to make the $AXSlogline = "...."; one line, and no space between the quote and the '|', I don't know why vb is doing that.
Reference:
http://www.websitepublisher.net/foru...=&threadid=392
http://www.xav.com/scripts/axs/
Bookmarks