Command line:
D:\curl\curl.exe --socks5-hostname 127.0.0.1:1080 http://client.huypv.net/uploads/contents/1388/songoku/face.bin -o face.bin
PHP code:
$cUrl = curl_init();
curl_setopt($cUrl, CURLOPT_URL, $url);
curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1);
$proxy = '127.0.0.1:1080';
curl_setopt($cUrl, CURLOPT_PROXY, $proxy);
curl_setopt($cUrl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
#curl_setopt($cUrl, CURLOPT_PROXYUSERPWD, 'username:pass');
$PageContent = curl_exec($cUrl);
curl_close($cUrl);
return $PageContent;
Title:
cURL - Use socks 5 as proxy
Description:
Command line: D:\curl\curl.exe --socks5-hostname 127.0.0.1:1080 http://client.huypv.net/uploads/contents/1388/songoku/face.bin -o face.bin ...
...
Rating:
4