basically what i want to do is send traffic to my website (www.website1.com) and then redirect it to another website (www.website2.com). i will be buying traffic from a source (www.website0.com) and i want website2 to get this traffic but i want it to look like its coming from website1.
Simplest method $url = parse_url($_SERVER['HTTP_REFERER']); switch($url['host']) { case 'google.com':$redirect="someurl_when_traffic_is_from_google"; break; case 'yahoo.com':$redirect="someurl_when_traffic_is_from_yahoo"; break; case 'msn.com':$redirect="someurl_when_traffic_is_from_msn"; break; default: #unknown referer $redirect = "http://www.mysite.com"; } header("Location: $redirect"); Code (markup): I hope it helps. regards
are you sure this works? i tried the the "location" method and it still appeared as if the traffic came from the original source. what is the reason for the ysm, google, switch code?
function header might not be working, becuase of some character or text already sent before it. regards