You might want to use the HttpSocket to do this rather than writing cURL if
you can, but it'll be doing the same thing anyway.

http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html

http://lennaert.nu/2013/12/01/how-to-use-httpsocket-instead-of-curl-in-cakephp-2/


On 7 February 2014 16:03, Zeeshan Ahmad <[email protected]> wrote:

> Turns out I needed to add the following curl option:
>
>     curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
>
> I still had to format the json_response to get it to work properly:
>
>     $json_utf8 = utf8_decode($json_response);
>     $return = json_decode(str_replace("?", "", $json_utf8));
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Kind Regards
 Stephen Speakman

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to