This code always fails (i.e., $result is Boolean false):
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $path);
cu
from: http://www.php.net/manual/en/function.curl-setopt.php
The number of milliseconds to wait while trying to connect. Use 0 to wait indefinitely. If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second.