Don't take my answer as a end solution! It's a bit buggy, but it's fine to work on, so i don't make any error!
<?php
ini_set('display_errors', false);
$fp = fsockopen ("www.truti.com", 80);
if(!$fp)
{
echo "Dead Link!\n";
}
else
{
echo "File is up!\n";
}
The "ini_set('display_errors', false);" is placed there because if the link is dead, you get 2 warnings, and by disabling them you can't see them but they are there still!
enjoy!