Что он должен проверять? Просто доступность ресурса? PHP: <?php set_time_limit(0); $linksFile = "links.txt"; // Файл с ссылками $linksArr = file($linksFile); foreach ($linksArr as $link) { $host = preg_replace("~http://|\/$~", "", trim($link)); $fp = fsockopen($host, 80, $errno, $errstr); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: ".$host."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); $res = ''; while (!feof($fp)) { $res .= fgets($fp, 128); } fclose($fp); if (preg_match("~HTTP/\d\.\d 2\d+~", $res)) { echo "<font color=green size=5>Ok</font>, link <b>".$link."</b> is available<br>\r\n"; } elseif (preg_match("~HTTP/\d\.\d 3\d+~", $res)) { preg_match("~Location: .*~", $res, $m); echo "<font color=green size=5>Ok</font>, link <b>".$link."</b> is available, but moved ".$m[0]."<br>\r\n"; } else { echo "<font color=red size=5>Not ok</font>, link <b>".$link."</b> is not available :(<br>\r\n"; } flush(); ob_flush(); } }