You are here: Re: PHP newbie, help needed « All PHP « IT news, forums, messages
Re: PHP newbie, help needed

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация