#1
  1. No Profile Picture
    d0g1e
    Guest
    Devshed Newbie (0 - 499 posts)
    how do i get the contents of a remote file (like a html file) in a variable WITHOUT using an external program like lynx? i tried open IN, "http://url";
    but it didn't work please help
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Go to http://www.perl.com/CPAN-local/modules/by-module/LWP/ and get libwww-perl-5.48.tar.gz

    Here is an example of fetching http://www.devshed.com/ using Simple.pm

    #!/usr/local/bin/perl
    $target_file = "http://www.devshed.com/";
    use LWP::Simple;
    my $file = get($target_file);
    @line = split(/n/, $file);
    print "Content-type: text/htmlnn";
    print "@linen";
    exit;


IMN logo majestic logo threadwatch logo seochat tools logo