Add curl_setopt(, CURLOPT_CONNECTTIMEOUT, 2);