On May 25, 2006, at 3:24 PM, Jayson Garrett wrote:

I'm just now beginning to work with the HTTP capabilities of RB, and was wondering if someone could point me in the right direction.

I'd like to automate some form submissions to a website, but the site checks to make sure only certain browsers are being used.

How would I emulate the user agent string of one of those browsers to pull the wool over the eyes of the website?

You just have to add a Header of type "user-agent", with the string content being the user agent you are trying to emulate. I believe that you will need to send this information for every transaction, so it might be best to subclass the HTTPSocket so that your preferred user agent will always be sent.

There is a lot more than just the browser information which is stored in the user-agent field... it is also the OS, some hardware, locale, and version information. Here is my user-agent tag for Safari:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3

My recommendation is to either pick your favorite browser or allow the user to select the user-agent in the Preferences. "Net Stakeout" was designed with a preference to allow the user to select from a predefined list of about 5 user-agent strings (mix of Macintosh and Windows), a user-agent style string with the app name and version, and a custom field for whatever the user wishes to define.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to