want to record all vistors User-Agents

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
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

want to record all vistors User-Agents

Post by claws »

hi..

i want to make a record of all the User-Agent fields of the visitor.
to be more specific. i want to maintain a lot of all the User-Agent fields to know which crawlers are visiting my website.

so..

in my every server scipt should i include code for storing $_SERVER['HTTP_USER_AGENT'] variable?

isnt there any other method for doing this.

i mean, since i am using apache server. in apache configuration isnt there any option to make a log of required HTTP HEADER FIELDS?????
yanglei1979
Forum Commoner
Posts: 38
Joined: Sat Aug 25, 2007 10:21 pm

Post by yanglei1979 »

can use mysql to record.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Apache's log files can have this information.
(#10850)
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

I have considered creating something along that line with the intent to have the script email me when it detects a new bot/spider/crawler in the useragent field so I can personally study various spiders crawling my website. I'm still too much of a PHP noob to do this though if you manage to figure out your original goal please let me know. :wink:
Post Reply