note 23050 deleted from ref.sockets by didou

From: Date: Tue, 16 Dec 2003 15:03:37 +0000
Subject: note 23050 deleted from ref.sockets by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62059@lists.php.net to get a copy of this message
Note Submitter: sethmail@poczta.fm ---- 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;

« previous php.notes (#62059) next »