|
Posted by mickey on 04/12/06 17:21
$ch should be $session in my code,I pasted incorrectly.
mickey wrote:
>
> Hello,
>
> I am trying to post an array using cURL from one PHP page to another. I
> can't figure out how to read the array on the page that actually
> receives it. Here is what I have...
>
>
> $session = curl_init();
>
> curl_setopt( $session, CURLOPT_URL,
> "https://www.myswebsite.com/receiving.php" );
>
> curl_setopt( $session, CURLOPT_HEADER, false );
> curl_setopt( $session, CURLOPT_POST, true );
>
> curl_setopt( $ch, CURLOPT_POSTFIELDS, $_POST['fields'] );
>
> curl_setopt( $session, CURLOPT_RETURNTRANSFER, true );
> curl_setopt( $session, CURLOPT_SSL_VERIFYPEER, false );
> curl_setopt( $session, CURLOPT_USERPWD, $sslpassword );
> curl_setopt( $session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
>
> $returned = curl_exec( $ch );
> curl_close( $ch );
> echo $returned;
>
>
>
>
> On the receiving page this echos zero ...
>
> $numFormFields = count( $_POST['fields'] );
>
>
>
Navigation:
[Reply to this message]
|