Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can go by either IP addresses or the 'User-Agent' string that the bot or web browser sends you. </p> <p>When Googlebot (or most other well-behaving robots) visit your website, they'll send you a $_SERVER['HTTP_USER_AGENT'] variable which identifies what they are. Some examples are: </p> <p>Googlebot/2.1 (+<a href="http://www.google.com/bot.html" rel="noreferrer">http://www.google.com/bot.html</a>)</p> <p>NutchCVS/0.8-dev (Nutch; <a href="http://lucene.apache.org/nutch/bot.html" rel="noreferrer">http://lucene.apache.org/nutch/bot.html</a></p> <p>Baiduspider+(+<a href="http://www.baidu.com/search/spider_jp.html" rel="noreferrer">http://www.baidu.com/search/spider_jp.html</a>)</p> <p>Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/531.4 (KHTML, like Gecko)</p> <p>You can find many more examples at these websites: <a href="http://www.user-agents.org/" rel="noreferrer">link text</a> <a href="http://user-agent-string.info/" rel="noreferrer">link text</a></p> <p>You could then use PHP to examine those user-agent strings and determine if the user is a search engine or not. I use something like this often: </p> <pre><code>$searchengines = array( 'Googlebot', 'Slurp', 'search.msn.com', 'nutch', 'simpy', 'bot', 'ASPSeek', 'crawler', 'msnbot', 'Libwww-perl', 'FAST', 'Baidu', ); $is_se = false; foreach ($searchengines as $searchengine){ if (!empty($_SERVER['HTTP_USER_AGENT']) and false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), strtolower($searchengine))) { $is_se = true; break; } } if ($is_se) { print('Its a search engine!'); } </code></pre> <p>Remember that no detection method (Google Analytics or another statistics package or otherwise) is going to be 100% accurate. Some web browsers allow you to set a custom user-agent string, and some misbehaving web crawlers may not send a user-agent string at all. This method can be probably effective for 95%+ of crawlers/visitors though.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload