$referer=getenv("HTTP_REFERER");
echo $referer;??
if (eregi("^http://www.domen.ru",$referer) || eregi("^http://domen.ru",$referer))
echo "ok";
else
echo "error";
$referer=getenv("HTTP_REFERER");
echo $referer;??
if (!eregi("^http://www.domen.ru",$referer) || !eregi("^http://domen.ru",$referer))
echo "error";
else
echo "ok";
$referer=getenv("HTTP_REFERER");
$domain='domain.ru';
if (str_str($referer,'http://'.$domain) || str_str($referer,'http://www'.$domain)) {
print 'OK';
}
else {
print 'BAD DOMAIN';
}
$referer=getenv("HTTP_REFERER");
$domain[0]='http://domain.ru';
$domain[1]='http://www.domain.ru';
if ($domain[0] == substr($referer,0,strlen($domain[0])) || $domain[1] == substr($referer,0,strlen($domain[1]))) {
print 'OK';
}
else {
print 'BAD DOMAIN';
}