php - CURL posting to another domain SSL Certificate Error -


i attempting use curl https address of api. api displays string result on page posting , not return me domain. i'm not sure if there way figured curl solution.

could possible occuring on localhost?

error receiving: ssl certificate problem, verify ca cert ok

//set url, number of post vars, post data curl_setopt($ch,curlopt_url, $url); curl_setopt($ch,curlopt_post, count($fields)); curl_setopt($ch,curlopt_postfields, $fields_string);   //execute post $result = curl_exec($ch); var_dump(curl_error($ch)); 

result: string 'ssl certificate problem, verify ca cert ok. details: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed' (length=146)

by default, php attempts certify peer's certificate.

if you're sure don't care, can see if curl request can fire, testing:

curl_setopt($ch, curlopt_ssl_verifypeer, false); 

before execute curl call.

the proper way set curl call use server's existing ca certificates using curlopt_capath or curlopt_cainfo.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -