The error is:
string 'SSL certificate problem: unable to get local issuer certificate' (length=63)
I am working on localhost with no SSL
EDIT: I found the issue myself, this fixed it:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
Thanks for pointing curl_error out.