Hi Manfred! On Tue, 13 Feb 2018 12:25:31 +0100 Manfred Lotz <ml_n...@posteo.de> wrote:
> Hi there, > Somewhere I found an example how to check if a website is up. > > Here my sample: > > #! /usr/bin/perl > > use strict; > > use LWP::Simple; > my $url="https://notabug.org"; > if (! head($url)) { > die "$url is DOWN!!!!" > } > > Running above code I get > https://notabug.org is DOWN!!!! at ./check_url.pl line 8. > This code seems to work fine here: #!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $url="https://shlomif.github.io/"; # my $url="https://notabug.org/"; if (! head($url)) { die "$url is DOWN!!!!"; } seems like notabug blocks libwww-perl. > > However, firefox shows the site works ok. > same here. Regards, Shlomi > > What am I doing wrong? > > -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/ <talexb> “Hey, I have a flat tire. Can you help me change it with a can opener and a pound of sesame seeds?” — talexb on parsing HTML or XML with regular expressions. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/