[PHP] Re: send a POST to a URL from within PHP code

2004-01-26 Thread Ben Ramsey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I answered a question similar to this yesterday. There is a user-submitted function listed in the PHP manual under HTTP functions that will POST to another page from within a PHP script and return the value of the POST back to the PHP script without

[PHP] Re: send a POST to a URL from within PHP code

2004-01-26 Thread Daniel Pupius
You need to open a socket: http://uk.php.net/manual/en/function.fsockopen.php Think there's a demo in the comments lower down the page. Yup, here it is: function httpPost($host, $path, $referer, $data) { $fp = fsockopen($host, 80); fputs($fp, POST .$path. HTTP/1.0\r\n); fputs($fp,