sjones Posted July 31, 2006 Share Posted July 31, 2006 I have a ecommerce site that has general products for everyone that visits. Also there is a wholesale client login. The script takes the user to a different category, with a seperate store for wholsale clients. Is it possible that when the wholesale category is opened, that we can make sure that it was the handle_login.php script that sent them there. If they have it bookmarked or opened from any other location besides the handle_login.php script. They would recieve a error message with the option to go to the login page. Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/ Share on other sites More sharing options...
trq Posted July 31, 2006 Share Posted July 31, 2006 take a look at $_SERVER['HTTP_REFERER']. Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/#findComment-66174 Share on other sites More sharing options...
.josh Posted July 31, 2006 Share Posted July 31, 2006 also you should pass a token through a session variable to the page, that would be generated from handle_login.php and checked on your target script. Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/#findComment-66228 Share on other sites More sharing options...
sjones Posted July 31, 2006 Author Share Posted July 31, 2006 The problem I am having with $_SERVER['HTTP_REFERER'] is that if someone would refresh the page it creates the error, because they were not directed there from the main page. Could someone help me with the proper code to check for two different $_SERVER['HTTP_REFERER']example:if ($_SERVER['HTTP_REFERER'] != "www.mysite.com/abc/" || "www.mysite.com/xyz/"){echo "You have arrived here without loging in Bla......" ;exit;}Any Thoughts ? Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/#findComment-66518 Share on other sites More sharing options...
pixy Posted July 31, 2006 Share Posted July 31, 2006 Not all servers support $_SERVER['HTTP_REFERER']...either that or it has to do with the browser, which may choose not to send refering information. Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/#findComment-66521 Share on other sites More sharing options...
wildteen88 Posted July 31, 2006 Share Posted July 31, 2006 [quote author=pixy link=topic=102382.msg406645#msg406645 date=1154370359]Not all servers support $_SERVER['HTTP_REFERER']...either that or it has to do with the browser, which may choose not to send refering information.[/quote]Yeah its to do with the browser. Some browsers do some dont. Also it can be easily fooled too. Quote Link to comment https://forums.phpfreaks.com/topic/16059-security-question/#findComment-66555 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.