Yes, the strings are formatted exactly like GET strings, but you'll have
to build the whole HTTP header in front of them in order to get a valid
HTTP request. So then, your code should look something like
$request="POST $request_path HTTP/1.0\r\n".
"User-Agent: My PHP application v1.0\r\n".
"\r\n". // This separates the header from the content
After that, you send $request.
Mike Mannakee wrote:
> Hi all,
> I'm setting up a curl operation with post fields, and I'm hoping someone can
> tell me how the post fields are formatted. I'm looking to pass a string to
> curl_setopt( $ch, CURLOPT_POSTFIELDS, $string), but the specifications don't
> tell one HOW to format the string. Is it just like a GET string or what?
> Anyone know?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php