Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here is script:<HTML> <head> <TITLE>Mysite Title</TITLE> <META NAME="resource-type" CONTENT="document"> <META NAME="description" CONTENT="Homepage"> <META NAME="keywords" CONTENT="word1,word2, word3"> <META NAME="distribution" CONTENT="all"> <META NAME="poc" CONTENT="Mike Smith 111-111-1111"> <META NAME="postdate" CONTENT="20011220 "> <META NAME="title" CONTENT="Department C "> <META NAME="url" CONTENT="http://www.mywebsitehere.com"> </head>
use LWP::Simple; use HTTP::Headers; use HTML::HeadParser; $h = HTTP::Headers->new; $p = HTML::HeadParser->new($h); $url = 'http://www.thisismysite.com'; $content = get($url); $p->parse($content); print $h->header('Title')."\n"; print $h->header('Content-Base')."\n"; #This does not print print $h->header('Last-Modified')."\n"; #This does not print print $h->header('Content-Length')."\n"; #This does not print print $h->header('Meta name')."\n"; #This does not print
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting Web site header info
by gav^ (Curate) on Sep 17, 2002 at 15:35 UTC |