Chevalier Jacques <[EMAIL PROTECTED]> wrote
>How can I grab a web page (with graph and picts) with a perl script?
If you're only interested in having a copy of a web page on your HD use
LWP::Simple.
from the PODs:
use LWP::Simple;
$content = get("http://www.sn.no/")
if (mirror("http://www.sn.no/", "foo") == RC_NOT_MODIFIED) {
... }
if (is_success(getprint("http://www.sn.no/"))) {
... }
get($url)
The get() function will fetch the document identified by the given URL and
return it. It returns undef if it fails. The $url argument can be either
a simple string or a reference to a URI object.
getprint($url)
Get and print a document identified by a URL. The document is printed to
STDOUT as data is received from the network. If the request fails, then
the status code and message are printed on STDERR. The return value is the
HTTP response code.
mirror($url, $file)
Get and store a document identified by a URL, using If-modified-since, and
checking the Content-Length. Returns the HTTP response code.
HTH
Robin
- [MacPerl] Grab a web page Chevalier Jacques
- Re: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Doug McNutt
- Re: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Peter Hartmann
- RE: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Bion Pohl
- Re: [MacPerl] Grab a web page Chris Nandor