This is a discussion on "code is not finding all 'bots' !" within the PHP Forum section. This forum, and the thread "code is not finding all 'bots' ! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
code is not finding all 'bots' !
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
code is not finding all 'bots' !
I have this code that was give to me a while ago, but it seems now that it does not get the bots!
the bots array has a list of text that in contained within the HTTP_USER_AGENT i have created my own counter so i can have a relistic figure showing how many actually people have viewed the site. what i would like someone do kindly do for me is check this code and tell me how i should change it so it checks for any case (upper or lower) that may be in the $subject variable. I was told that the "/" and "/i" are what does this but i am sure it is not working for me as i am still getting some bots get throught and increasing my counter. thank you in advance for your help. J
Last edited by Jason3107; Dec 2nd, 2006 at 23:48. |
|
|
|
#2
|
|||
|
|||
|
Re: code is not finding all 'bots' !
Jason, each of the bots decides on its own user agent string, and so at best you'll catch most of them. By carefully filtering your log files and changing the strings you look for, you may improve the filters, but there's no fail-safe solution by eliminating.
Two alternatives that may work for you / assist you 1. Look and see what / who has read your robots.txt file, and use that as a basis / additional basis for for identifying bots 2. Instead of a blacklist principle, a white list principle may work better for you - look for visits from known human visitors and count that way, perhaps? |
![]() |
| Tags |
| case insesitive search |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stopping bots | saltedm8 | Webforumz Cafe | 14 | Dec 13th, 2007 00:20 |
| pesky Search Engine bots | eon201 | Search Engine Optimization (SEO) | 0 | Nov 9th, 2007 10:32 |
| Google Bots | Pádraig | Search Engine Optimization (SEO) | 5 | Jun 29th, 2007 23:09 |
| Guestbook Spam Bots v Human Help.. | Andy_H | Classic ASP | 9 | Jan 29th, 2006 13:48 |