werty37 Posted November 12, 2006 Share Posted November 12, 2006 HIALLOW 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 Quote Link to comment Share on other sites More sharing options...
sasa Posted November 12, 2006 Share Posted November 12, 2006 statement '$a != 1 or $a != 2' is allways true!!I think thet you want (ALLOW == $_SERVER["HTTP_X_FORWARDED_FOR"]) || (ALLOW == "All")or (ALLOW != $_SERVER["HTTP_X_FORWARDED_FOR"]) && (ALLOW != "All") Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.