you need to make sure that PHP script is allowed to access your website. You can check this by using a test script like this:
$initurl = 'http://www.yourdomain.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $initurl);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$fdata = curl_exec($ch);
Save it as PHP file and open in browser.