Since pings can be used to DOS a server, many sites disable pinging. Thus, if you get an unreachable host by ping, you may still be able to view its web page. Someone mentioned LWP::Simple, which is probably your best bet for web content. For anything else (i.e. mail), use
to open up a port on the remote machine. What you'd want to look for would depend on what protocol you were monitoring (i.e. for SMTP you might look for an HELO string)