Reply to Re: help with php5 and cURL

Your name:

Reply:


Posted by Andy Jeffries on 04/13/06 19:06

Hi Mickey,

Two things:

1) Check that you've got the syntax of this right:

> curl_setopt( $session, CURLOPT_POSTFIELDS, $_POST['fields'] );

If $_POST['fields'] currently contains an array, you probably want to do
something like this:

curl_setopt( $session, CURLOPT_POSTFIELDS,
array("fields"=>$_POST['fields']));

Otherwise you aren't passing through a name the array can be referred to
using on the other side.

2) I don't know how PHP will handle you trying to pass an array (PHP
data structure) over HTTP. You may need to use the serialize/unserialize
functions on the data on the way in/out (respectively).

Cheers,


Andy


--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

[Back to original 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

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