2013年2月18日

PHP CURL 使用代理访问服务器

摘要: 使用CURL库访问代理服务器function curl_string ($url,$user_agent,$proxy){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_PROXY, $proxy); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_COOKIEJAR, "c:\cookie.txt"); ... 阅读全文

posted @ 2013-02-18 16:41 misoag 阅读(38608) 评论(2) 推荐(0) 编辑

Ubuntu下配置nginx作为http代理服务器

摘要: 修改/etc/nginx/sites-available下的default文件内容为:server { server_name 42.121.107.174; resolver 8.8.8.8; resolver_timeout 5s; location / { proxy_pass $scheme://$host$request_uri; proxy_set_header Host $http_host; p... 阅读全文

posted @ 2013-02-18 16:39 misoag 阅读(653) 评论(0) 推荐(0) 编辑

导航