hi there ... got this script off of the net. it's PHP. okay, the deal is that you add the php link to anything in your AOL Instant messenger profile, right? well ... it works fine only that it records a person's visit and whenever they visit again, it ignores it and doesnt record it. i've done some LISP but i can't follow this at all. how can i get it so it logs every visit? what line of code do i remove?
this is quite similar to the service provided by www.imchaos.com except it doesn't have those stupid ads. does anyone know any way of tracking ip's in addition to screen names? i'm just curious of where the hits on my website our coming from. thanks!
(i added a javascript redirect in the code to automatically redirect the person to my website after they reached the log.html page as well ... if this is inefficient, is there a better way?)
thanks!
edit: clarification
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
<?
$ururl = "http://[insert website here]";
$dir = ".";
if (is_dir($dir)) {
if (isset($sn)) {
if (!stristr($sn,"%n")) {
$sn = $_GET["sn"];
$rfile = fopen("$dir/log.html","r+");
$people = fread($rfile, filesize("$dir/log.html"));
fclose($rfile);
$sn = str_replace("+"," ",$sn);
$sn = str_replace("%20"," ",$sn);
$the_query = $QUERY_STRING . " " . $SERVER_PROTOCOL;
$sn = ereg_replace(".*sn=", "", $the_query);
$sn = ereg_replace("&.*", "", $sn);
$sn = ereg_replace("HTTP/*.*","",$sn);
$people = ereg_replace(" ", "", $people);
$sntemp = ereg_replace(" " , "", $sn);
if (!stristr($people,$sntemp)) {
$rfile = fopen("$dir/log.html","a");
fputs($rfile,"$sn
");
fclose($rfile);
}
echo "
";
}
}
echo "<HTML><BODY>";
echo "<FONT FACE='verdana' SIZE=2>";
if (isset($sn)) {
include("$dir/log.html");
}
}
?>
</FONT></BODY></HTML>
</FONT></BODY></HTML>
this is quite similar to the service provided by www.imchaos.com except it doesn't have those stupid ads. does anyone know any way of tracking ip's in addition to screen names? i'm just curious of where the hits on my website our coming from. thanks!
(i added a javascript redirect in the code to automatically redirect the person to my website after they reached the log.html page as well ... if this is inefficient, is there a better way?)
thanks!
edit: clarification
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
<?
$ururl = "http://[insert website here]";
$dir = ".";
if (is_dir($dir)) {
if (isset($sn)) {
if (!stristr($sn,"%n")) {
$sn = $_GET["sn"];
$rfile = fopen("$dir/log.html","r+");
$people = fread($rfile, filesize("$dir/log.html"));
fclose($rfile);
$sn = str_replace("+"," ",$sn);
$sn = str_replace("%20"," ",$sn);
$the_query = $QUERY_STRING . " " . $SERVER_PROTOCOL;
$sn = ereg_replace(".*sn=", "", $the_query);
$sn = ereg_replace("&.*", "", $sn);
$sn = ereg_replace("HTTP/*.*","",$sn);
$people = ereg_replace(" ", "", $people);
$sntemp = ereg_replace(" " , "", $sn);
if (!stristr($people,$sntemp)) {
$rfile = fopen("$dir/log.html","a");
fputs($rfile,"$sn
");
fclose($rfile);
}
echo "
";
}
}
echo "<HTML><BODY>";
echo "<FONT FACE='verdana' SIZE=2>";
if (isset($sn)) {
include("$dir/log.html");
}
}
?>
</FONT></BODY></HTML>
</FONT></BODY></HTML>
