To elaborate on PodMaster's reply, change the second line of your script to something like this
The argument to the agent option determines the type of HTTP client that $ua will represent itself as. For the sake of illustration, I used the string corresponding to my version of Firefox. The exact version of Firefox is probably not important, but if you want to match it exactly to the one for your browser, or more generally, if you want to know how to best replicate what your Firefox browser is telling the server, get yourself the LiveHTTPHeaders extension for Firefox. This extension pops up a window showing exactly the conversation between your browser and the server, which you can then replicate with your script.my $ua = LWP::UserAgent->new( agent => 'User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/2 +0050223 Firefox/1.0.1' );
the lowliest monk
In reply to Re: Help with LWP::UserAgent server error 500
by tlm
in thread Help with LWP::UserAgent server error 500
by ezekiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |