Wrong POSTFIELDS Posted
| From: | Brian Smither | Date: | Sat, 18 Feb 2012 00:54:25 +0000 |
| Subject: | Wrong POSTFIELDS Posted | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-316720@lists.php.net to get a copy of this message | ||
I have a script that accepts four POST variables. Three are used and five more are added for a total
of eight keys and their urlencode() values all strung together in the proper format.
Then cURL is initialized with the field string given to:
curl_setopt($ch, CURLOPT_POST,8);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
But that's not the string arriving at cURL's target URL! What's arriving at the
target is exactly the POST array that this script received in the first place.
Here's what I don't understand...
The cURL request is coming from this script on domainA, but the target address is also domainA. Does
everybody play nice in this situation?
PHP 5.3.5
Apache 2.2
Note: CURLOPT_POST evaluates to true, regardless that I use an integer. All other curl* commands are
set.