Forum Moderators: coopster & phranque

Message Too Old, No Replies

Harvester

CGI script to Grab a webpage?

         

knighty

11:52 am on Feb 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have searched the net trying to find a simple perl script to grab the contents of a page and paste it onto a page on my site.

All i can find are XML and e-mail havesters.

I'm not a programmer so any help or directions would be greatly appreciated.

jason

1:19 pm on Feb 1, 2002 (gmt 0)

10+ Year Member



#!/usr/bin/perl
use LWP::Simple;
use LWP::UserAgent;
print "Content-type:text/html\n\n";
$url = "http://www.domain.com/page.html";
my $ua = new LWP::UserAgent;
my $res = $ua->request(HTTP::Request->new(GET => $url));
my $content = $res->content;
print $content;

Paul_Kelly

9:21 pm on Feb 3, 2002 (gmt 0)



is this close to what you need?
[smartcgis.com...]

regards,
Paul

knighty

9:11 am on Feb 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks guys,

Apparently I need an LWP module in the PERL directory...just trying to get IT to sort it out. So next time this year I'll let you know what happens ;)