I have a similar script set up on my sites with the following code:
Code:
<?php
$path = array(
"amateursgonebad" => "http://www.amateursgonebad.com/",
"glamourmodelsgonebad" => "http://www.glamourmodelsgonebad.com/"
);
if (array_key_exists($_GET["id"], $path)) {
header("location: " . $path[$_GET["id"]]);}
else {header("location: http://www.greenguysboard.com/");}
?>
The code is saved in a PHP file and all you need to do is link to the PHP file in question and use a request to call the correct URL:
Example, if the file name is "links.php" and you want to link to the paysite Glamour Models Gone Bad, the URL you would use will be the following:
Code:
http://www.pathtofile.com/links.php?id=glamourmodelsgonebad
If you happen to name the file "index.php", you don't need to write out "index.php". You could just add the request like the following:
Code:
http://www.pathtofile.com/links/?id=glamourmodelsgonebad
The header location code will redirect the surfer if he tries to access the file to whatever URL you put there.