Here is an example of how to manually perform an HTTP POST with PHP. If you execute this code, you should see the search results of searching the PHP manual for the term "curl" (using language en_US). Curl is another option for people who need to do this sort of thing.
Happy hacking. Chris <base href="http://www.php.net/"> <? function php_post($host, $path, $data) { $http_response=""; $fp=fsockopen($host, 80); fputs($fp, "POST $path HTTP/1.1\r\n"); fputs($fp, "Host: $host\r\n"); fputs($fp, "Content-Type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-Length: " . strlen($data) . "\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fputs($fp, "$data"); while(!feof($fp)) { $http_response.=fgets($fp, 128); } fclose($fp); list($http_headers, $http_content)=explode("\r\n\r\n", $http_response); return $http_content; } $content=php_post("www.php.net", "/search.php", "lang=en_US&pattern=curl&show=manual"); echo $content; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php