Why is curl not working through proxy?

$url = "google.com";
$curl = curl_init();
$cookie = dirname($_SERVER['SCRIPT_FILENAME']).'/cookie/cookie.txt';
$headers = [
'Referer: https://google.com/',
'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0'
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($curl, CURLOPT_PROXY, "");
curl_setopt($curl, CURLOPT_PROXYUSERPWD, "EUR223233:XC4AYne6bl");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, THIS, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
$str = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo $str;

curl_getinfo($curl, CURLINFO_HTTP_CODE) gives 0
$str gives nothing.
June 27th 19 at 15:21
1 answer
June 27th 19 at 15:23
If opt is given, returns its value. Otherwise, returns an associative array with the following elements (which correspond to values of the argument opt), or FALSE in case of error:

Failed to connect to port 8080: Timed out - Hailee_Mitchell commented on June 27th 19 at 15:26
: well here is the answer. your Proxy is unavailable. - Violet_Wiso commented on June 27th 19 at 15:29

Find more questions by tags PHPWeb Development