mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
updated example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146343 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
13f602acb0
commit
c7b41a6ac2
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/network.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.fsockopen">
|
||||
<refnamediv>
|
||||
|
@ -78,7 +78,11 @@ $fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30);
|
|||
if (!$fp) {
|
||||
echo "$errstr ($errno)<br>\n";
|
||||
} else {
|
||||
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n");
|
||||
$out = "GET / HTTP/1.1\r\n";
|
||||
$out .= "Host: www.example.com\r\n";
|
||||
$out .= "Connection: Close\r\n\r\n";
|
||||
|
||||
fputs ($fp, $out);
|
||||
while (!feof($fp)) {
|
||||
echo fgets ($fp,128);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue