View Single Post
  #3 (permalink)  
Old 11-16-04, 05:24 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
not 100% sure that will work as you might need double = and no ' in the ip statement and you might want to exit to prevent the page loading anyways!

PHP Code:

<?php


//get user ip
$ip $_SERVER['REMOTE_ADDR'];

//put your ip here
$me "12.345.67.89";

if (
$ip !== $me) {
echo 
"Access Denied! Invalid IP Address";
exit();
}
?>
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote