Codice PHP:
<?php
$host 
'www.example.com';
$pagina '/cartella/pagina.php';

$fp fsockopen($host80$errno$errstr30);
if (!
$fp) {
    
$allpage "pagina non disponibile";
} else {
    
$out "GET $pagina HTTP/1.1\r\n";
    
$out .= "Host: $host\r\n";
    
$out .= "Connection: Close\r\n\r\n";

    
fwrite($fp$out);
    
$allpage '';
    while (!
feof($fp)) {
        
$allpage .= fgets($fp128);
    }
    
fclose($fp);
}
?>