curl command line to PHP curl curl command line to PHP curl curl curl

curl command line to PHP curl


From http://curl.haxx.se/docs/manpage.html :

-k, --insecure: (SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.

Looking further at reading SSL page with CURL (php), this tells you that you have to set CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST to FALSE. This basically overrides the "security checks".

I think that's what you need to mirror the --insecure command line option.