Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LWP::UserAgent problem

Posted on 2009-04-10
4
Medium Priority
?
453 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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 1000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

670 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