Help - Search - Members - Calendar
Full Version: Link Redirect
Get Paid Forum - Get Paid Discussion > Webmaster's Corner > General Discussion on Building, Running & Making Money from a Website
hubcaps
Does anyone got a link redirect script(cgi,php,asp)?
And can offer some support ab.gif
Im a noob when it comes to programming anything. ar.gif
sinnyboy
Here is a perl/cgi small script for you:

#!/usr/bin/perl

# Add your links like this with a comma at the end
#of each EXECPT for the last link
@links = (
"1::http://www.yahoo.com",
"2::http://www.hotmail.com"
);

#To redirect to a link, use your address as:
#http://yoursite.com/cgi-bin/this_script.pl?1
#
#Change "1" to the number of the link above av.gif)
#In this case it will go to Yahoo.

foreach $link (@links)
{
($number,$url) = split (/::/, $link);
if ($ENV{QUERY_STRING} eq "$number")
{
$to = $url;
}
}
print "Location: $to\n\n";
exit;
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.