You are here: Re: CURL Problem.. Comparing output from IE/CURL differs « PHP Programming Language « IT news, forums, messages
Re: CURL Problem.. Comparing output from IE/CURL differs

Posted by Andy Hassall on 11/02/91 11:31

On 9 Nov 2005 08:55:31 -0800, "Wescotte" <wescotte@earthlink.net> wrote:

>I found the issue..
>If I use
>curl_setopt($ch, CURLOPT_POSTFIELDS,
>"operation=DIRECTORY&Submit=Submit");
>
>it works
>but with
>
>$formvars = array();
>$formvars["Submit"]="Submit";
>$formvars["operation"]="DIRECTORY";
>curl_setopt($ch, CURLOPT_POSTFIELDS, $formsvars);
>
>it does not..
>Any idea why?

Maybe:

http://cvs.php.net/php-src/ext/curl/interface.c

Particularly look at revisions 1.30 and 1.46 and the bug it references?

It's not exactly well documented when you're supposed to pass as the parameter
when using CURLOPT_POSTFIELDS.

' CURLOPT_POSTFIELDS The full data to post in a HTTP "POST" operation.'

This seems to mean the raw POST data as per your first bit of code, but some
versions of the PHP curl extension seem to accept arrays (which is useful).
Looking at the code it appears to accept objects too.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

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

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