Re: Wrong POSTFIELDS Posted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 18.02.12 01:54, schrieb Brian Smither:
> 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.
>
>
>
Maybe you could provide a bit more of information.

var_dump($_POST); // at the beginning of the script
// the code that assembles $string
// the target url for your curl request from curl_init or CURLOPT
// the other curloptions not mentioned here but used

-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: marco@xxxxxxxxxx

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux