Beh...ma qui c'è qualcosa che non mi quadra...

Codice PHP:
$plain_response "";

$fp fsockopen("www.google.it"80);
  
fputs($fp"GET /intl/it/about.html HTTP/1.1\r\n");
  
fputs($fp"Host: w_w_w.google.it\r\n");
  
fputs($fp"Connection: Close\r\n\r\n");

  while (!
feof($fp))
    {
    
$riga_risposta_http fgets($fp);
    
$plain_response .= $riga_risposta_http

    
$fd fopen("c:/tmp/my.txt","a");
      
fwrite($fd,$riga_risposta_http);
    
fclose($fd);
    }
fclose($fp);

echo 
$plain_response
PERCHE' IL FILE VIENE SCRITTO SOLO ALL'USCITA DEL while, ovvero se il while non termina perchè non metto Connection: Close, non vedo mai alcuna riga del file???