How to tell human from search engine?
I wrote a php script to track visitors to my website. How do I tell which visit is a real human and which is just a search engine. Obviously, I want to count human visitors, not search engines.
This may help you
<?php
if (preg_match(’/slurp|inktomisearch|[Gg]rub|[Bb]ot|archiver|[Ss]qworm/’, $_SERVER['HTTP_USER_AGENT'])){
echo "Not a human";
}
?>
One Response to “How to tell human from search engine?”
Leave a Reply
|
July 31st, 2009 at 5:05 pm
This may help you
<?php
if (preg_match(’/slurp|inktomisearch|[Gg]rub|[Bb]ot|archiver|[Ss]qworm/’, $_SERVER['HTTP_USER_AGENT'])){
echo "Not a human";
}
?>
References :
http://safewaresblog.co.nr/