Anyone knowing why curl successfully uses socks5 and prints an error on socks4? This works: curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); PHP: This doesn't: curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); PHP: The error: Notice: Use of undefined constant CURLPROXY_SOCKS4 - assumed 'CURLPROXY_SOCKS4' Code (markup):
Like the error already says, it's because that constant is not defined and php curl probably doesn't support socks 4 proxies. http://www.php.net/manual/en/curl.constants.php