string input = "三国杀haha";
byte[] bytes = Encoding.GetEncoding("GB2312").GetBytes(input);
string search = "http://www.baidu.com/s?wd=";
System.Net.WebProxy Proxy = new System.Net.WebProxy("192.168.4.107", 8080);
Proxy.UseDefaultCredentials = true;
foreach (var b in bytes)
{
search += string.Format("%{0:X}", b);
}
WebClient client = new WebClient() { Proxy = Proxy, Encoding = System.Text.Encoding.UTF8, UseDefaultCredentials = true };
string result = client.DownloadString(search);
Console.WriteLine(result);
Console.Read();
刚好有以现成的代码 希望能帮助你
爱吃西瓜的小强[mcpd]