I want to record the sites that referrer people to my site, but dont want to record any of my own pages. This is the code i have made right now but it doesnt work.


if(!eregi("moneybyus\.com", $HTTP_REFERER) {
dbconnect('moneybyus_com');
$result = mysql_query("Select * from referrer where url = $HTTP_REFERER");
if(mysql_result($result,0,0)>0) {
mysql_query("UPDATE referrer SET num=num+1 where site = '$HTTP_REFERER'");
}
if(mysql_result($result,0,0)<1) {
$sql = "INSERT INTO referrer SET
site = '$HTTP_REFERER'";
}
}


I dont think that I can put the ! infront of eregi. How else can I do it?