Need meta refresh to send to a different site when referrer contains certain words. So if the referrer contains words such as: mail google ebay Send traffic to link A if anything else Send to link B Thanks for your help
$redirectflag = substr_count($_SERVER['HTTP_REFERER'], 'google') + substr_count($_SERVER['HTTP_REFERER'], 'mail') + substr_count($_SERVER['HTTP_REFERER'], 'ebay'); if($redirectflag > 0) header('location:http://www.SITEA.com'); else header('location:http://www.SITEB.com'); PHP:
if (isset($_SERVER['HTTP_REFERER']) AND preg_match('~google|mail|ebay~i', $_SERVER['HTTP_REFERER'])) { // Redirect to A } else { // Redirect to B } PHP:
I like that one more. I dunno why, but I write some real dirty code, always have. I can make just about anything happen, but it's grimy. haha I <3 globals. (yeah, i get that bad)