curl-users
From Sever: curl via php, socks5
Date: Wed, 26 May 2004 14:21:15 +0400
Hello curl-users,
I can't solve some problem while trying to get a site content via
socks5 proxy (URL Information: libcurl/7.11.2 OpenSSL/0.9.6c zlib/1.1.4)
While truing to do like this:
<?
error_reporting(E_ALL);
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, "http://www.somesite.com");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_PROXY, "24.44.68.212:5542");
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
print curl_errno ($ch);
print $result;
curl_close ($ch);
?>
I get:
Notice: Use of undefined constant CURLOPT_PROXYTYPE - assumed 'CURLOPT_PROXYTYPE' in /home/techn/card-service.biz/public_html/members/test.php on line 7
Notice: Use of undefined constant CURLPROXY_SOCKS5 - assumed 'CURLPROXY_SOCKS5' in /home/techn/card-service.biz/public_html/members/test.php on line 7
0
If I Use HTTP proxy or no proxy at all i get the right result :|
The socks proxy is ok, so i do not know what to do...
-- Best regards, D-zain mailto:info_at_d-zain.netReceived on 2004-05-26