I have found a secure login script on the web but when i try to login in it the the error message
Warning: fread() [
function.fread]: Length parameter must be greater than 0 in
/home/a8753560/public_html/elite/secure.php on line
7
PHP Code:
<?php
// published at: scripts.tropicalpcsolutions.com
$filename = "user.log";
$log = fopen($filename, "r");
$contents = fread($log, filesize($filename));
fclose($log);
// Add usernames below
if ($contents == "CharlesFBooker" || $contents == "CRYPT1C ASSAS1N" || $contents == "cotto" || $contents == "aaron" || $contents == "mr knight") {
$filename = "user.log";
$log = fopen($filename, "w+");
fputs($log,"");
fclose($log);
echo <<<EOF
<!-- ####################################################### -->
<!-- ####################################################### -->
<!-- Begin your HTML below -->
<br><br>
<center>
<h1 style="font:12pt arial">THIS IS A SECRET PAGE</h1>
<!-- End your HTML above -->
<!-- ####################################################### -->
<!-- ####################################################### -->
EOF;
}
else echo "<center><Br><font color=red face=arial size=3 >Error</font>...<font face=arial size=3 >You will have to log on via the log on form to view this page.<br><br><a href='login.html' style='color:black'>Click here</a> to try again.";
?>
Ca anyone help me