Solved

LWP::UserAgent problem

Posted on 2009-04-10
4
426 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now