Ok
Here is the code I have on the inital page that logs a visit:
<?php
$redirect = "http://" . $HTTP_SERVER_VARS['HTTP_HOST'] .
$HTTP_SERVER_VARS['PHP_SELF'];
$redirect = substr($redirect, 0, strrpos($redirect, "/"));
if (isset($GET['my_sn']))
{
$my_sn = $GET['my_sn'];
if ($fp = fopen("visitors", 'a'))
{
if (!isset($GET['sn']))
$visitor = "lurker";
else
$visitor = $GET['sn'];
$date = strftime("%A, %B %d, %Y at %H:%M:%S %Z");
$ip = getenv ("REMOTE_ADDR");
fwrite($fp,
"$visitor visited on $date via $my_sn from $ip.\n");
fclose($fp);
}
else {
print "<html><head>\n";
print "<title>x.php Error</title>\n";
print "<meta http-equiv=\"Refresh\" content=\"2;url=$redirect\">\n";
print "</head>\n";
print "<body bgcolor=\"red\">\n";
print "<h1>x.php Error</h1>\n";
print "<p>\n";
print "Error opening SN log file. Check to make sure it exists and\n";
print "is writeable by the webserver.\n";
print "</p>\n";
print "<p>\n";
print "You should probably let $my_sn know about this.\n";
print "</p></body></html>\n\n";
exit;
}
}
header("Location: $redirect");
The URL to get to that page is
http://jaysin.us/aim/x.php?sn=%n&my_sn=Jaysinism
but that URL is the one that logs the visit
then I want to script to redirect to display the log in a nice format
currently the page rediredts to a form if you type "visitors" in the form and press the button it will show the log I hope all this makes sense and will provide enough information for someone to help me thanks
Jaysin