Ошибка с fsockopen()
Создаю запрос
Код:
$fp = fsockopen("httр://localhost", 80, $errno, $errstr, 30);
if (!$fp) echo "Error:$errstr ($errno)\n";
else {
$out = "GET httр://localhost/index.php HTTP/1.0\r\n";
$out .= "Host: httр://localhost/index.php\r\n";
$out .= "Referer: httр://localhost/index.php\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp))
{echo fgets($fp, 128 );}
fclose($fp);}
if (!$fp) echo "Error:$errstr ($errno)\n";
else {
$out = "GET httр://localhost/index.php HTTP/1.0\r\n";
$out .= "Host: httр://localhost/index.php\r\n";
$out .= "Referer: httр://localhost/index.php\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp))
{echo fgets($fp, 128 );}
fclose($fp);}
Выдает ошибку "0" :(