View Single Post
Old 10-07-2003, 02:21 PM  
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
Hey lil,

Code:
$refinfo = parse_url($_SERVER['HTTP_REFERER']);
$levels = explode('.', $refinfo['host']);
$toplevel = array_pop($levels);
if (count($levels)) $dom = array_pop($levels).'.'.$toplevel;

if ($dom hahahaha 'okdomain.com') {
  Header('Location: http://www.okurl.com/page.html');
} else {
  Header('Location: http://www.badurl.com/page.html');
}
exit;
You could also use regex to do all this, but this should work just as well. Do not want to think of a weird regex to filter out a domain right now <G>
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote