View Full Version : PHP Header Redirect with register_globals OFF

11-14-2008, 01:48 AM
Hi All,

I'm looking to use a php script, similar to the one discussed here (http://www.websitepublisher.net/forums/showthread.php?t=10619) to redirect visitors to different websites.

Now, I can get this script working if I turn register_globals on, however, I hear there is security issues with this. So, can anyone advise me about how I can modify the following out.php file in order for it to work with register_globals off?

if ($m == "google") {$link = "http://www.google.com";}
if ($m == "yahoo") {$link = "http://www.yahoo.com";}
if ($m == "live") {$link = "http://www.live.com";}

header("Location: $link"); // Jump to the url above

Eg. the redirect URL would be /out.php?m=google

Thanks in advance!