You are here: Re: Curl(): maximum length of POST arguments? « All PHP « IT news, forums, messages
Re: Curl(): maximum length of POST arguments?

Posted by Andy Hassall on 07/02/06 15:52

On Sun, 02 Jul 2006 16:35:51 +0100, Bonge Boo! <bingbong@spamcop.net> wrote:

>>> // create a new curl resource
>>> $ch = curl_init();
>>> // set URL and other appropriate options
>>> curl_setopt($ch, CURLOPT_URL, $url);
>>> curl_setopt($ch, CURLOPT_HEADER, 0);
>>> curl_setopt($ch, CURLOPT_POST, 1);
>>> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
>>> curl_setopt($ch, CURLOPT_REFERER, "http://www.blahbl.com/
>>> zippo/Search.ASP?WCI=AddToPortFolio");
>>> curl_setopt($ch, CURLOPT_POSTFIELDS, urlencode($dezrez_query));
>>
>> You've just encoded all the "&" and "=" separators; you should be encoding
>> the
>> keys and values separately and joining them up with "&" and "=".
>
>Done that. Still fails. I get returned a 1, which I assume indicates curl
>succeeded,

That depends on the options.

> but nothing else returned to the $string I pass the result of the
>curl to.

With the settings above, cURL would just print the results to the browser, not
return any content. See CURLOPT_RETURNTRANSFER.

If you want more information, ask for it using curl_getinfo(), curl_error(),
and CURLOPT_VERBOSE.

--
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

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