How to get the content of a URL in perl? 
Author Message
 How to get the content of a URL in perl?

Hi all,

  I want to get the content of a webpage in perl.  For example in perl, I
do this:

  $content = function ("www.yahoo.com");

  What function can  help me out to do that?  or what package?
  I know there is a package named Libwww... Can this package do that?
  And how to set the timeout ?  

  Thanks.

--
.........................................................................


`````````````````````````````````````````````````````````````````````````



Sun, 16 May 2004 08:10:17 GMT  
 How to get the content of a URL in perl?

Quote:
>  I want to get the content of a webpage in perl.  For example in perl, I
>do this:

>  $content = function ("www.yahoo.com");

>  What function can  help me out to do that?  or what package?
>  I know there is a package named Libwww... Can this package do that?
>  And how to set the timeout ?  

>  Thanks.

It's been a while since I've done this, but going back to my old
scripts these are the commands I used:

use LWP::Simple;

my $location = "http://www.websitehere.com";

my $ydata = (get $location);

Does that help?



Sun, 16 May 2004 08:38:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting contents of a URL

2. getting the content of a url...

3. Getting the contents of a URL.

4. Getting perl to execute after print content

5. Getting a web page content using perl

6. Getting MS Excel's cell contents of Unicode text from Perl

7. Getting file from URL with Perl/CGI

8. Retrieving contents of a url

9. Retrieving contents of url

10. How to import URL contents!

11. Getting Content type of a file

12. Getting content of a remote site

 

 
Powered by phpBB® Forum Software