// yanggang@mimvp.com
// http://proxy.mimvp.com
// 2015-11-09
using System;
using System.IO;
using System.Net;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public static void Main(string[] args)
{
System.Net.WebProxy proxy = new WebProxy("218.21.230.156", 443); // "107.150.96.188", 8080
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://proxy.mimvp.com");
request.Proxy = proxy;
using (WebResponse response = request.GetResponse())
{
using (TextReader reader = new StreamReader(response.GetResponseStream()))
{
string line;
while ((line = reader.ReadLine()) != null)
Console.WriteLine(line);
}
}
}
public static void Main2()
{
// your code goes here
System.Net.WebProxy proxy = new WebProxy("107.150.96.188", 8080);
System.Net.HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
req.Proxy = proxy;
req.Timeout = 30 * 1000;
System.Net.HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
Encoding bin = Encoding.GetEncoding("UTF-8");
StreamReader reader = new StreamReader(resp.GetResponseStream(), bin);
string str = reader.ReadToEnd();
Console.WriteLine(str);
reader.Close();
reader.Dispose();
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有