php代理fanqiang
Release: 2016-05-25 17:05:20
Original
3337 people have browsed it
跳至
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | array ('timeout' => 5,
'proxy' => 'tcp:
'request_fulluri' => True,)
)
);
$result = file_get_contents ( $url , False, $ctx );
echo $result ;
?>
|
Copy after login
2. [代码]python代码
1 2 3 4 5 6 7 8 9 10 | import urllib2
proxy = '127.0.0.1:8118'
url= "http://www.youtube.com"
opener = urllib2.build_opener( urllib2.ProxyHandler({'http':proxy}) )
urllib2.install_opener( opener )
sContent = urllib2.urlopen(url).read()
filepath= "a.html"
file1=open(filepath,'wb')
file1.write(sContent)
file1.close()
|
Copy after login
3. [代码]curl脚本
1 2 3 4 5 | #使用http代理
curl -x 127.0.0.1:8118 -o m1.mp3 http:
#使用socks5
curl --socks5 127.0.0.1:8888 -o m.mp3 http:
|
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-12-12 11:03:15
-
2024-12-12 11:01:15
-
2024-12-12 10:59:13
-
2024-12-12 10:58:16
-
2024-12-12 10:57:14
-
2024-12-12 10:56:12
-
2024-12-12 10:55:13
-
2024-12-12 10:54:17
-
2024-12-12 10:53:16
-
2024-12-12 10:51:16