Hello,
you need to make sure that PHP script is allowed to access websites via https. You can check this by using a test script like this:
<?php
$initurl = 'https://www.yourdomain.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $initurl);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$fdata = curl_exec($ch);
curl_close($ch);
print_r($fdata);
Save it as PHP file and open in browser.