Solved

LWP::UserAgent problem

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PERL - Find newest folder 12 118
SCCM 2012 SP1 to SCCM SP2 upgrade 6 95
Joomla Website Malfunction 9 96
Perl script to delete older files 6 73
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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 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.

864 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

21 Experts available now in Live!

Get 1:1 Help Now