terrific terrific - 1 year ago 158
PHP Question

how to detect search engine bots with php?

How can one detect the search engine bots using php?

Answer Source

Here's a Search Engine Directory of Spider names

Then you use $_SERVER['HTTP_USER_AGENT']; to check if the agent is said spider.

if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "googlebot"))
    // what to do
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download