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?”

  1. safewaresblog Says:

    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/

Leave a Reply

Posted on July 31st, 2009 by admin and filed under Search Engine |
|

Blogroll

    Meta