Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 19th, 2001, 06:49 AM
MattWilliams MattWilliams is offline
hmmmm...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: UK
Posts: 37 MattWilliams User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Unhappy

I am trying to use LWP to fetch a file from the net and i keep on getting "Error: 500 Can't connect to proxy.bstoke.uk.ibm.com:80 (Timeout)" can any one help heres the code:

use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->timeout(600);
$ua->env_proxy;
$ua->agent("Mozilla/8.0"); # pretend we are very capable browser


$req = HTTP::Request->new(GET => 'http://www.pc.ibm.com/partner/uk/index.html');
$req->header('Accept' => 'text/html');


# send request
$res = $ua->request($req);


# check the outcome
if ($res->is_success) {
print $res->content;
} else {
print "Error: " . $res->status_line . "\n";
}

Reply With Quote
  #2  
Old March 19th, 2001, 08:13 AM
dsb dsb is offline
PerlGuy
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Posts: 714 dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 15 h 44 m 20 sec
Reputation Power: 36
Send a message via AIM to dsb
Wink

May not be your script. Or perhaps there is restricted access to that website.
__________________
- dsb -
Perl Guy

Reply With Quote
  #3  
Old March 19th, 2001, 08:58 AM
MattWilliams MattWilliams is offline
hmmmm...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: UK
Posts: 37 MattWilliams User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Smile

Thanks i have resolved the issue now and its working fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > LWP headaches


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT