How to send a curl request with pem certificate via PHP?
I think that you need to use the tmpfile() and stream_get_meta_data.
$pemFile = tmpfile();fwrite($pemFile, "test.pem");//the path for the pem file$tempPemPath = stream_get_meta_data($pemFile);$tempPemPath = $tempPemPath['uri'];curl_setopt($ch, CURLOPT_SSLCERT, $tempPemPath);
Source: This answer here in SO helps me with similar problem.