Welcome to the Monastery | |
PerlMonks |
Re: How to check if a website is up?by chimni (Pilgrim) |
on Apr 05, 2004 at 08:27 UTC ( [id://342591]=note: print w/replies, xml ) | Need Help?? |
Hi,
You could check out LWP::UserAgent and LWP::Simple. If you want to extend into monitoring and health checks look at WWW::Mechanize.
Just get the page and check for a 200 status (the documentation on these modules is self explanatory) If you dont want to go with a perl module and want a simple command line solution check WGET. wget -q --proxy=off --cache=off $URL -O /tmp/urlget.html HTH Regards, Rajdeep. Abigail is right,content checking for a string you are expecting is a good idea
In Section
Seekers of Perl Wisdom
|
|