Jump to content

basics


werty37

Recommended Posts

HI
ALLOW is a constant and it has either an IP address or a string 'All'. I include this script in all the pages so that i can debug the site from the specified IP and others stil wouldnt be able to see it.
I have got a problem in this code. say i have an ip 127.0.0.21 stored in the constant ALLOW but my ip is different, i am stil able to access the page. it does not redirect to the specified page

[code]if ( (ALLOW!=$_SERVER["HTTP_X_FORWARDED_FOR"]) || (ALLOW!="All") )
{
header("Location: uc.php");
}[/code]

Any help would be appreciated
Link to comment
https://forums.phpfreaks.com/topic/26978-basics/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.