It looks like it may be a web host issue. Apparently they don’t allow socket connections to remote hosts. Sucks for me.
Here’s a simple PHP script that can be used to test this.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.google.com/");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');
$result = curl_exec($ch);
echo '<pre>INFO';
print_r(curl_getinfo($ch));
echo '</pre>';
echo '<pre>RESULT';
print htmlentities($result);
echo '</pre>';
echo '<pre>CURLERR';
echo curl_errno($ch) . ' ' . curl_error($ch);
echo '</pre>';
echo '<pre>CURLVERSION';
echo curl_version();
echo '</pre>';
curl_close($ch);
?>
Just thought I’d post back to this in case anyone else has this same issue. I imagine my web host isn’t the only one that doesn’t allow remote socket connections.