mirror of
https://github.com/php/presentations.git
synced 2026-03-26 00:22:11 +01:00
13 lines
241 B
PHP
13 lines
241 B
PHP
<?php
|
|
$fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
|
|
if (!$fp) {
|
|
echo "$errstr ($errno)<br>\n";
|
|
}
|
|
|
|
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n");
|
|
while (!feof($fp)) {
|
|
echo fgets ($fp,128);
|
|
}
|
|
fclose ($fp);
|
|
?>
|