Detecting search engines

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Detecting search engines

Post by andym01480 »

What is the best way of detecting whether a search bot is accessing a script?

I have a free mp3 download page which simply logs downloads - I'd rather not count search engines as I want to know how many people have downloaded an mp3!
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

A comprehensive list of known search bot user-agents: http://www.user-agents.org/
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

Thanks!

It just occurred to me the simplest way was to disallow the download script in robots.txt!
Post Reply