Results 1 to 4 of 4

Thread: PHP Affiliate Jump Script with a message page

  1. #1
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Affiliate Jump Script with a message page

    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?

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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:
    PHP Code:
    $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
    HTML Code:
    <a href="http://www.yoursite.com/redirect.php?link_to=http://www.retailer.com">retailer.com</a>

  3. #3
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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:
    PHP Code:
    $link_to $_GET['link_to']; 
    , and then uses that value to print a <meta> tag redirect on the thank-you page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •