Internal Server Error diye hata ile karşılaştım bu sorunu nasıl halledebilirim.bu kodda ne gibi düzenlemeler yapmalıyım ?
not : suspend konumunu anlamak için suspend sayfasında değişiklik yaptım ve suspend konumuna getirilen sitelerin başında <!--suspend--> yazısı oluyor. bu şekilde anlaşılabilir.
<?php
set_time_limit(0);
$a=1;
$txt="domain.txt";
$dosya = fopen($txt, "r");
while (!feof($dosya))
{
$satir = fgets($dosya,1024);
echo $a." - $satir - ".sorgu($satir)."<br>";
$a=$a+1;
}
fclose($dosya);
function sorgu($domain)
{
$host = trim($domain);
$kaynak=@file_get_contents("http://www.".$host, NULL, NULL, 0, 13);
if($socket =@fsockopen($host, 80, $errno, $errstr, 30))
{
$ilkkarakterler=substr($kaynak,0,13);
if($ilkkarakterler=='<!--suspend--')
echo "<font color='#996600'>suspend konumunda</font>";
else
echo "<font color='#009900'>aktif konumda</font>";
fclose($socket);
}
else
{
echo "<font color='#FF0000'>offline konumda</font>";
}
}
?>