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