fsockopen: add host header to example, add see also for curl extension

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64295 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
jim winstead 2001-12-08 21:58:49 +00:00
parent 680909fe33
commit 74460af0f0

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.47 $ -->
<!-- $Revision: 1.48 $ -->
<reference id="ref.network">
<title>Network Functions</title>
<titleabbrev>Network</titleabbrev>
@ -218,7 +218,7 @@ $fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}
@ -252,11 +252,12 @@ if (!$fp) {
UDP support was added in PHP 4.
</para>
</note>
See also: <function>pfsockopen</function>,
See also <function>pfsockopen</function>,
<function>socket_set_blocking</function>,
<function>socket_set_timeout</function>, <function>fgets</function>,
<function>fgetss</function>, <function>fputs</function>,
<function>fclose</function>, and <function>feof</function>).
<function>fclose</function>, <function>feof</function>, and
the <link linkend="ref.curl">Curl extension</link>.
</para>
</refsect1>
</refentry>