Forum Moderators: coopster
I have the function as follows - i can't get it to return any results. Could someone please advise what it is i'm missing with this.
Thanks
Marcus
function getReferalHost()
{
$refer = parse_url($HTTP_SERVER_VARS['HTTP_REFERER']);
$host = $refer['host'];
if(strstr($host,'google'))
{
return 'Google';
}
elseif(strstr($host,'yahoo'))
{
return 'Yahoo';
}
elseif(strstr($host,'msn'))
{
return 'MSN';
}
}
function getReferalHost(){
$refer = parse_url($HTTP_SERVER_VARS['HTTP_REFERER']);
$host = $refer['host'];
if($host=='')
return 'No refer';
if(strstr($host,'google'))
{
return 'Google';
}
elseif(strstr($host,'yahoo'))
{
return 'Yahoo';
}
elseif(strstr($host,'msn'))
{
return 'MSN';
}
else{
return 'Unknown';
}
}
Thanks
Mahabub