<?php
$redirect = "http://" . $HTTP_SERVER_VARS['HTTP_HOST'] .
$HTTP_SERVER_VARS['PHP_SELF'];
$redirect = substr($redirect, 0, strrpos($redirect, "/"));
if (isset($_GET['my_aim']))
{
$my_aim = $_GET['my_aim'];
if ($fp = fopen("visitors", 'a'))
{
if (!isset($_GET['aim']))
$visitor = "lurker";
else
$visitor = $_GET['aim'];
$date = strftime("%A, %B %e, %Y at %R");
fwrite($fp,
"$visitor visited on $date via $my_aim.\n");
fclose($fp);
}
}
header("Location: $redirect");
?>
For some reason no matter, what I change in this, it will pause for a couple seconds, and then go to whatever redirect I give it, but it won't write to the file that I want it to. Any suggestions? I am running PHP on my own computer and the only think I am think of is that I don't have the right file permissions on the visitors file, but I don't know how to change that on my own box running WinXP, I know how to it on a server, but not on my own box. Thank a lot.