Solved

LWP::UserAgent problem

Posted on 2009-04-10
4
434 Views
Last Modified: 2012-05-06
Hi All,
I am trying to access a webpage using LWP::UserAgent module but i am receiving "500 Internal Server error" message.  I have full access to the webpage and also i am ableto access the web page manually thru a web browser.  Also, the code appears to work with other sites which have developed by me and my collegues except for this page.  Please assist!!!
0
Comment
Question by:Venkatesan_G02
4 Comments
 
LVL 13

Expert Comment

by:kawas
ID: 24122520
The code probably works in your browser because it is more forgiving ... try looking in the error logs to see what the problem is.
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 250 total points
ID: 24127160
It is likely that you aren't sending the information in the exact way the server is expecting.  If you are trying to fill out forms, and submit information, you might want to use the WWW::Mechanize module instead, which makes it easier to do this kind of stuff.
0
 
LVL 2

Assisted Solution

by:lyhan
lyhan earned 250 total points
ID: 24346512
Some website block the useragents other than the well known web browsers

LWP::UserAgent has the default agent "libwww-perl/#.###",

you may need to set the agent to mozilla, i.e

 $ua->agent('Mozilla/5.0');

0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Experts-Exchange users below are the steps you can follow to upgrade your Lync server to latest CU's or cumulative updates. Note: Perform it during non-production hours.   Step 1: Backup your lync and SQL server database. Follow below article: h…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question