SSL Certificate Problem In Curl Call

Some times you get error of SSL Certificate in curl call. This is a very common error that every person have faced this thing in curl call. Simplest way to get rid of it with this error just add the line in your curl call and your error will be removed from your response.

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);