We are having two domains ( both https ): one as main domain https://dev.project.com/ and the other for images https://dev-images.project.com/. The frontpage loads the images ju
Try to passing the path to your cafile like this.
$opts=array(
"ssl"=>array(
"cafile" => "D:\\wamp64\\cacert.pem",
"verify_peer"=> true,
"verify_peer_name"=> true
)
);
file_get_contents($url,false,stream_context_create($opts));
edit: if this fails only in your local server, check if you have you added your locally created SSL cert in cacert.pem in your local server and that it contains no errors or extra lines.