Forum Moderators: coopster
now if i wanted to block <whatever>.site.<whatever>
how would i go about it.
the refer comes in a varible called $site
lets say site = "search.site.com" also for a second example "www.site.ch" i need to detect "site" and disregard the refer.
heres the code i have. it isnt working though.
-----------------------------------------------------------
$refered=$_SERVER['HTTP_REFERER'];
$url=parse_url($refered);
$site = $url[host];
// fix some domains
if ($site == "")
{
$site = "No refer";
}
if (preg_match('/^http:\/\/*/i.?site.*/i',$site))
{
$site="badsite";
}
-----------------------------------------------------------
any suggestions?
Thanks
Karl