Hi, i need a php code to check my refferer and if the refferer is an website which i have chosen it echos one thing else it echos the other thing. can you help? for example if $refferer="google.com" urgent
Thanks alot for the reply, but can anyone give an example for my function please like a full working example?
if(GetDomain($_SERVER['HTTP_REFERER'])=='google.com') { echo 'you are from google.com'; } function GetDomain($url) { $nowww = ereg_replace('www\.','',$url); $domain = parse_url($nowww); if(!empty($domain["host"])) { return $domain["host"]; } else { return $domain["path"]; } } PHP: