CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
using WWW::Mechanize to spoof newer browser

 



majinserge
New User

Apr 5, 2011, 11:09 AM

Post #1 of 2 (2632 views)
using WWW::Mechanize to spoof newer browser Can't Post

Hi everyone.

I am writing a script that will use WWW::Mechanize to traverse a web site and get information, however this web site only lets certain browsers view it (namely Internet Explorer 4.0 or higher, Netscape 6.0 or higher, Mozilla .9 or higherOpera 5.0 or higher, Safari/Konqueror) and when I load the page in my script, it gives me an error message and says that i must use one of these browsers if i want to log into their site.

Is there any way around this? Can WWW::Mechanize be set to imitate different browsers? Thanks in advance


miller
User

Apr 5, 2011, 12:26 PM

Post #2 of 2 (2628 views)
Re: [majinserge] using WWW::Mechanize to spoof newer browser [In reply to] Can't Post

WWW::Mechanize is a subclass of LWP::UserAgent. Simply specify the 'agent' in your constructor to impersonate another browser.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives