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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 28, 2007 Author Share Posted June 28, 2007 ok, thanks Regards ACE Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 28, 2007 Author Share Posted June 28, 2007 lol, making history 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.