Re: Fw: Spoofing user_agent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following solution works:

I set my user-agent to:
VerseOfTheDaySitemapRobot/1.0 (http://www.TheVerseOfTheDay.info)

By doing:
ini_set('user_agent', "VerseOfTheDaySitemapRobot/1.0 (http://www.TheVerseOfTheDay.info)");

When ran by a cron job this causes AWSTATS to treat the hits as:
Unknown robot (identified by 'robot')    9704+18    284.82 MB    30 Nov 2010 - 07:12

The part which tricked me is that if I run the site map generator PHP script using a user interface the hits on the site are credited to the Firefox (the browser I use) user-agent string.  The following article discusses how to change browser user agents:
http://www.walkernews.net/2007/07/05/how-to-change-user-agent-string/ 

Ron

The Verse of the Day
âEncouragement from Godâs Wordâ
http://www.TheVerseOfTheDay.info

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux