This is a quick crude method but it should do it, let me know if it works (don't pay someone for <10 lines of code) ;)
Just set the list of URLS in the urls variable.
Code:
<?php
$urls = array('http://google.com','http://yahoo.com');
foreach ($urls as $value) {
$siteCheck = get_headers($value);
$statusCode = substr($siteCheck[0] , 9, 3);
if ($statusCode >= 400) {
print $value . ': Down<br />';
} else {
print $value . ': Up<br />';
}
}
?>