Page 1 of 1

want to record all vistors User-Agents

Posted: Sat Dec 08, 2007 12:42 am
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?????

Posted: Sat Dec 08, 2007 1:04 am
by yanglei1979
can use mysql to record.

Posted: Sat Dec 08, 2007 1:11 am
by Christopher
Apache's log files can have this information.

Posted: Mon Dec 10, 2007 2:38 am
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: