note 23050 added to ref.sockets

From: Date: Mon, 08 Jul 2002 08:03:06 +0000
Subject: note 23050 added to ref.sockets
Groups: php.notes 
Request: Send a blank email to php-notes+get-32727@lists.php.net to get a copy of this message
To Ramar: All you have to do is to use fopen() function. Here is an example of using POST method: $host = "www.php.net"; $data = "lang=en_US&pattern=sockets&show=quickref"; $fp = fsockopen($host,80); fputs($fp, "POST /search.php HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: " . strlen($data) . "\n"); fputs($fp, "User-Agent: MSIE\n"); fputs($fp, "Connection: close\n\n"); fputs($fp, $data); while (!feof($fp)) $buf .= fgets($fp,128); fclose($fp); echo $buf; -- http://www.php.net/manual/en/ref.sockets.php http://master.php.net/manage/user-notes.php?action=edit+23050 http://master.php.net/manage/user-notes.php?action=delete+23050 http://master.php.net/manage/user-notes.php?action=reject+23050

« previous php.notes (#32727) next »