[ic] Grabbing a web page content using LWP::Simple

Stefan Hornburg Racke racke@linuxia.de
22 Mar 2001 08:43:23 +0100

"Jimmy Eaton" <jeaton@silverclicks.com> writes:

> I need to grab the contents of a web page. I have tried using the below 
> code.
> [perl Global=1 subs=1]
> use LWP::Simple
> my $return=LWP::Simple::get('http::/www.somesite.com/index.html')
> return $return
> [/perl]
> No matter what library I use and the arguments to the perl call. I can not 
> get it to return the page. It will send the request but will hang up trying 
> to read from the socket.  
> I have tried setting it up as a Global Sub, as a usertag and plain perl 
> using Use Socket. The code will work fine outside of minivend but will 
> always hang when it comes to reading from the socket. It will write to the 
> socket but can not read from it.
> How can one read in the contents of a web page?

Please look at the get_url usertag.


Alter ego of LinuXia Systems (URL: http://www.linuxia.de),
Debian maintainer, Interchange developer
For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)