MyBB Community Forums

Full Version: Checking for a bot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm making a SCM for my site and I want to check to see if a user is a bot or not. Are there any relatively small PHP scripts that can do that for me?
Yeah, use an IP Logger and check the logger and watch their useragent.

Dr Small
What are useragents?
* Dr Small drops his head on to his desk, with a loud thump.

You've never heard of a useragent?!
Well, every browser has a predestined useragent that identifies that person with their browser details, computer details, mozilla compatible etc, etc, etc.

Example:
Here is my default useragent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070321 Firefox/2.0.0.3 (Swiftfox)

So, each bot has their own useragent, and in their useragent, is will usually say Googlebot or Yahoo! Slurp and such, as to identify that they are a bot.

Read more on Useragents here:
http://www.google.com/search?q=Define%3A...=firefox-a

Dr Small
Dr Small Wrote:Dr Small drops his head on to his desk, with a loud thump.

Must of hurt lol...
Dr Small Wrote:You've never heard of a useragent?!

No I just asked the question to be annoying. Sad