Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: questions concerning using perl to monitor webpages

by @ncientgoose (Novice)
on May 22, 2003 at 04:18 UTC ( #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
use Net::HTTP; my $link = ''; $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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://259976]
[Corion]: Meh. IE crashes when displaying that SVG as saved from Firefox ...
LanX blame Canada!
[Discipulus]: to crash is not the default behaviour of IE? ;=)
[Discipulus]: so every library (js) to sdelect and modify the id parameters can be good.
[Discipulus]: I never understood something: I can on the fly modify the XML structure of the SVG using for example XML::Twig ?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-03-23 09:36 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.