you could also use [man]fsockopen[/man]
<?php
//assuming that $url is the url you want to link to
$link = '';
if(($fh = fsockopen($url,80,$errno,$error,10)) !== FALSE)
$link = $url;
elseif(($fh = fsockopen('http://'.$url,80,$errno,$error,10)) !== FALSE)
$link = 'http://' . $url;
?>
after this runs $link will be the properly formatted $url. However if the page pointed to by $url is off line for any reason then $link will be empty. This gives you the added benefit of being able to link to urls that are active and display warnings for those that are not.