PHP Classes

basic stuff

Recommend this page to a friend!

      Bot Class  >  All threads  >  basic stuff  >  (Un) Subscribe thread alerts  
Subject:basic stuff
Summary:needs more work
Messages:3
Author:John Haywood
Date:2015-08-17 12:37:31
 

  1. basic stuff   Reply   Report abuse  
Picture of John Haywood John Haywood - 2015-08-17 12:37:32
Not worth using in this iteration.
You should be returning a boolean value to make validation easier.
Also you could use stripos instead of strpos then you would not have to test for 'bot' and 'Bot'.
Not all robots or spiders have 'bot' in the UA string so maybe some more research needed there.

  2. Re: basic stuff   Reply   Report abuse  
Picture of Samuel Adeshina Samuel Adeshina - 2015-08-17 19:03:53 - In reply to message 1 from John Haywood
Yeah, I agree with John. I wrote a Bot some time last month to scrape a colleague's site, The Bot was designed to look like a perfect browser. That means, if this class were used, my bot would get a free pass. So this class still needs a lot of research.

  3. Re: basic stuff   Reply   Report abuse  
Picture of Ruben Elizondo Ruben Elizondo - 2015-08-20 20:15:25 - In reply to message 1 from John Haywood
The function needs to be polished of course....i know there are many spiders out there not identifying as "bot", but the purpose is to identify only that important ones from Google, Bing, etc.

Anyway, i'll do more research on this about identifying spiders and bots

Thanks for your comments