Reply to Re: posting with cURL problem

Your name:

Reply:


Posted by zorro on 12/29/06 18:55

> zorro wrote:
> > it doesn't work :
> > curl_setopt($curl, CURLOPT_POSTFIELDS, array('clown'=>'bozo') );

Benjamin wrote:
> CURLOPT_POSTFIELDS only takes a string as it's parameter


I didn't find any specification stating that it takes a string
parameter.
http://www.php.net/manual/en/function.curl-setopt.php

There are dozens of examples where a string or an array is used and i
have also tried both successfully. The problem is only on this one
particular web site I'm posting to.

I need to use an array and not a string because for posting a file
upload one needs to use this syntax:
curl_setopt($curl, CURLOPT_POSTFIELDS,
array('mypic'=>"@path/to/image.gif") );

I tested that this works on my localhost and online testing server.

[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

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