Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: questions concerning using perl to monitor webpages

by @ncientgoose (Novice)
on May 22, 2003 at 04:18 UTC ( [id://259976]=note: print w/replies, xml ) Need Help??


in reply to questions concerning using perl to monitor webpages

use this bit to get the page code
@ancientgoose
use Net::HTTP; my $link = 'http://www.whateverlink.com'; $link =~ s/.+:\/\/(.+)/$1/ if ($link =~ /.+:\/\/.+/); my $s = Net::HTTP->new(Host => "$link") || 0; my $htmlcode = ''; if ($s) { $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0"); my($code, $mess, %h) = $s->read_response_headers; while ($n = $s->read_entity_body($buf, 1024)) { $htmlcode .= "$buf"; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://259976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found