cUrl and proxies
| From: | Mark Rees | Date: | Thu, 30 Jun 2005 15:41:47 +0000 |
| Subject: | cUrl and proxies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-217900@lists.php.net to get a copy of this message | ||
Hello
This code gives me a 407 Proxy Authentication Required message. Can anyone
see what is missing? The username and password are definitely correct, as
are the proxy IP and port.
Win2k. php 5.0.4
$ch=curl_init();
curl_setopt ($ch, CURLOPT_URL, 'http://www.google.com/');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch,CURLOPT_HTTP_VERSION,'CURL_HTTP_VERSION_1_1');
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch,CURLOPT_PROXY,'10.0.0.8:8080');
curl_setopt($ch,CURLOPT_PROXYUSERPWD,'abc:123');
$ret = curl_exec($ch);
Thanks in advance
Mark