Crew algemeen |
|
of met fsockopen?
<?php
$timeout = 5;
$domein = "www.domein.ext"
$socket = fsockopen($domein, 80, $errno, $errstr, $timeout);
if (!$socket) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: ".$domein."\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($socket, $out);
while (!feof($socket)) {
echo fgets($socket, 128); //de inhoud van de webpagina
}
fclose($fp);
}
?>
<?php $timeout = 5; $domein = "www.domein.ext" $socket = fsockopen($domein, 80, $errno, $errstr, $timeout); if (!$socket) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: ".$domein."\r\n"; $out .= "Connection: Close\r\n\r\n"; echo fgets($socket, 128); //de inhoud van de webpagina } } ?>
|