Use FURL to Retrieve Website Headers
It's important to know what headers your website and its files are communicating. For example, if your website is providing a 404 status, you're probably streaking toward your computer to fix the problem. Using the FURL library, you may retrieve website headers from the command line.
The Shell Script
Simple and quick -- just like every shell directive.
The Sample Response
HTTP/1.1 200 OK Date: Thu, 25 Jun 2009 01:50:50 GMT Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.6 X-Pingback: http://davidwalsh.name/xmlrpc.php Cache-Control: max-age=1, private, must-revalidate Expires: Thu, 25 Jun 2009 01:50:51 GMT Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=UTF-8
Don't have FURL? Install it by scripting this:
sudo port install furl
How is this useful? I would use this to periodically (cron) check my website to make sure it was up. What would you use this for?