Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2009-03-03, 01:23 PM   #4
A.J. Angel
And Lord, we are especially thankful for nuclear power, the cleanest, safest
energy source there is. Except for solar, which is just a pipe dream
 
Join Date: Sep 2008
Posts: 229
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.
A.J. Angel is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:33 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc