MasterACE14 Posted June 28, 2007 Share Posted June 28, 2007 Would this piece of code check the WebSite the user was just on and run some code if it was the correct site? if($_SERVER['HTTP_REFERER'] == 'http://www.paypal.com/') { // execute some code } Regards ACE Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/ Share on other sites More sharing options...
redarrow Posted June 28, 2007 Share Posted June 28, 2007 your right but dont relie on it ok. Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284662 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2007 Author Share Posted June 28, 2007 lol, ok. Thanks. would that allow the code to execute if it was extended like. http://www.paypal.com/payment/54?=sd/ or something like that. or would it have to be just www.paypal.com ? Regards ACE Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284664 Share on other sites More sharing options...
redarrow Posted June 28, 2007 Share Posted June 28, 2007 yes just tested it and you need to come from a link and the order is http:// ok Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284668 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2007 Author Share Posted June 28, 2007 ok, thanks Regards ACE Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284669 Share on other sites More sharing options...
redarrow Posted June 28, 2007 Share Posted June 28, 2007 working example ok mate. <?php if($_SERVER['HTTP_REFERER']=='http://format_to_your_page.php'){ header("location: http://www.google.com"); } ?> ps. now me and you worked that out we can both for learning do a good test we can both design a stats program with using all the server built in arrays hay lol. Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284672 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2007 Author Share Posted June 28, 2007 lol, making history Link to comment https://forums.phpfreaks.com/topic/57525-solved-would-this-work/#findComment-284686 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.