need help with fwrite
Posted: Wed Jan 18, 2006 9:05 pm
ok this is my script
i dont want it to log me in the log..
thank you
Code: Select all
<?php
$snf = str_replace(" ", "", $sn);
if ("nickman013" == $snf) header('Location:/nvideos/Password.php');
if(gotti1 == $page) include("GottiVideo.php");
if(gotti2 == $page) include("/GottiVideo2.php");
if ($_SERVER['remote_addr'] != '68.195.158.89') {
$date = date("F j, Y, g:i a");
$sn2 = "$snf";
$ip = @$REMOTE_ADDR;
$filename = 'visit_log.htm';
$somecontent = "<tr><td align=center>$sn2</td><td align=center>$page</td><td align=center>$date</td><td align=center>$ip</td></tr>";
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success $filename";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
}
?>i dont want it to log me in the log..
thank you