Andrew121007 Posted June 24, 2008 Share Posted June 24, 2008 I am making a store. And i am using paypal to make all the payments. Now i put the return URL to galkonspride.com/return.htm (Not real, just an example) and in that page i want to make a script that says if the person doesnt come from https://paypal.com/* then send him to fpsmedia.tk Something like If href!=https://paypal.com/* { header("fpsmedia.tk") } Im sure that is wrong but I cant remember much lol. Any help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/ Share on other sites More sharing options...
rhodesa Posted June 24, 2008 Share Posted June 24, 2008 you can use HTTP_REFERER, but the client's browser is setting it, therefore it's not 100% guaranteed to be there or be correct. <?php if($_SERVER['HTTP_REFERER'] && 'www.paypal.com' != parse_url($_SERVER['HTTP_REFERER],PHP_URL_HOST)){ header("http://fpsmedia.tk"); exit; } //Continue loading page ?> Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573362 Share on other sites More sharing options...
Andrew121007 Posted June 24, 2008 Author Share Posted June 24, 2008 Ok ill try it out. Thanks ill reply if it doesnt work. Mmh It still lets me in even after i added the script. Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573388 Share on other sites More sharing options...
rhodesa Posted June 24, 2008 Share Posted June 24, 2008 what happens with this: <?php if($_SERVER['HTTP_REFERER'] && 'www.paypal.com' != parse_url($_SERVER['HTTP_REFERER'],PHP_URL_HOST)){ header("http://fpsmedia.tk"); exit; } die("Got the URL: ".$_SERVER['HTTP_REFERER']); ?> Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573399 Share on other sites More sharing options...
Andrew121007 Posted June 24, 2008 Author Share Posted June 24, 2008 This appears Got the URL: lol Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573402 Share on other sites More sharing options...
rhodesa Posted June 24, 2008 Share Posted June 24, 2008 So a referer isn't getting set. In that case, I don't know of a way to check. Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573411 Share on other sites More sharing options...
discomatt Posted June 24, 2008 Share Posted June 24, 2008 There is no sure-fire way of checking... it's as simple as that. You'll have to check your transactions and verify the user has payed... This is quite easily done using cURL or existing php->paypal api scripts Link to comment https://forums.phpfreaks.com/topic/111705-send-to-page-if-not-come-from-page-help/#findComment-573429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.