From 74460af0f071fdc009c45f8ce39d6a85f20a0b82 Mon Sep 17 00:00:00 2001 From: jim winstead Date: Sat, 8 Dec 2001 21:58:49 +0000 Subject: [PATCH] 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 --- functions/network.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/network.xml b/functions/network.xml index 7d428a484a..476e7a1074 100644 --- a/functions/network.xml +++ b/functions/network.xml @@ -1,5 +1,5 @@ - + Network Functions Network @@ -218,7 +218,7 @@ $fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)
\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. - See also: pfsockopen, + See also pfsockopen, socket_set_blocking, socket_set_timeout, fgets, fgetss, fputs, - fclose, and feof). + fclose, feof, and + the Curl extension.