use LWP::Simple;
$URL='http://www.expertsguide.info/';
if (head($URL))
{
print '$URL exists' ;
}
else
{
print 'URL does not contain anything';
}
head() function returns much more information eg, Content-type, document length, last modified time, expiry date and server name. Capture that using,
view sourceprint?
my @headers = head $URL;
print join "\n", @headers;
$URL='http://www.expertsguide.info/';
if (head($URL))
{
print '$URL exists' ;
}
else
{
print 'URL does not contain anything';
}
head() function returns much more information eg, Content-type, document length, last modified time, expiry date and server name. Capture that using,
view sourceprint?
my @headers = head $URL;
print join "\n", @headers;
No comments:
Post a Comment