View Full Version : PHP Affiliate Jump Script with a message page
Dazza30
04-11-2011, 11:01 PM
Hi Is there such a script that when a link is clicked and before reaching a retailers site, a message can be displayed such as "Thank you for visiting our site you are being sent to xyz.com"
Ive come across these kind of things regularly, so I know they do exist, I found this affiliate php jump script http://www.stevedawson.com/article0006.php but it does only half of of the job.
Please can someone assist?
just have your link point to the php script, and then serve a "thank-you" page with a meta redirect to the affiliate page. something like:
$link_to = $_GET['link_to'];
print '<!DOCTYPE html>
<html>
<head><meta http-equiv="refresh" content="5;url='.$link_to.'"></head>
<body>
<p>Thanks for visiting, you are being redirected to '.$link_to.'. If you are not redirected within 10 seconds, <a href="'.$link_to.'">click here</a>.</p>
</body>
</html>';
and your link would look something like this
<a href="http://www.yoursite.com/redirect.php?link_to=http://www.retailer.com">retailer.com</a>
Dazza30
04-12-2011, 08:13 AM
Hi traq thanks for responding, I'm a newbie when it comes to php and anytime I see it no matter how simple it should be I get confused!
What you told me to do I suppose looks simple, but is there a way of breaking it down so I can grasp it? :)
basically, you're using a query string in the url ( ?link_to=http://www.redirect-to-this-site.com ) to tell the php script where the user wants to go.
PHP finds that value by using the $_GET superglobal:
$link_to = $_GET['link_to'];, and then uses that value to print a <meta> tag redirect on the thank-you page.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.