The first one is a pretty basic script, this one is slightly more advanced, and could be very useful if you have lots of links to different offers on your website. What we'll need to do here is create a PHP file (named it "links.php"). Now all we need to do is include different statements (like ringtones, dating, loans, mortgage) to the links we create, and it will redirect to the correct URL. Use this format: hxxp://www.yoursitehere.com/link.php?offer=dating This comes in handy for affiliate marketing, since you can then manage all your links from one URL. Make sure you use robots.txt on your server, and disallow "links.php" there.
<?php
$offer = $_GET['offer'];
$type = $_GET['type'];
if ($offer == "ringtones")
{$jumplink= "http://www.yourlinkhere1.com";}
if ($offer == "dating")
{$jumplink= "http://www.yourlinkhere2.com";}
if ($offer == "loans")
{$jumplink= "http://www.yourlinkhere3.com";}
header("Location: ".$jumplink."&sub=".$type."");
?>