How can I allow ONLY one IP with PHP?

Pratip

New member
use $_SERVER['REMOTE_ADDR'] and check the ip

if it matches then do what you want.........

if($_SERVER['REMOTE_ADDR']=='[some ip]')
{
blah blah.....
}

Hope this helps............
 
I know about the htaccess files, but I'm curious as to if it's able to be done with PHP. If so, can someone give me a code for allowing only one?

P.S. I'm unable to use htaccess files, don't ask.
 
Back
Top