apparently, this is only possible when they do support for searching on multiple regions, otherwise, you have to submit multiple requests with classes in System.Net, for example, with HttpWebRequest/HttpWebResponse, and analyze/parse the returned page (redirection invovled)for example foreach (string sRegion in Regions)
{
string sURL = String.Format("http://www.t7online.com/cgi-bin/suchen?ORT={0}&LANG=cn&PRG=citybild", sRegion); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sURL);
//request.AllowAutoRedirect = true;
request.Proxy = new WebProxy("proxy.phl.sap.corp",8080);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Encoding enc = Encoding.GetEncoding("GB2312"); StreamReader sr = new StreamReader(response.GetResponseStream(), enc);
string sHtml = sr.ReadToEnd();
sr.Close();
response.Close();
Console.WriteLine(sHtml );
}but if the returned html page is a frameset, apparently, you need to parse the html, retrieve the links and use the above method again to retrieve the real htmlGood luck!
{
string sURL = String.Format("http://www.t7online.com/cgi-bin/suchen?ORT={0}&LANG=cn&PRG=citybild", sRegion); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sURL);
//request.AllowAutoRedirect = true;
request.Proxy = new WebProxy("proxy.phl.sap.corp",8080);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Encoding enc = Encoding.GetEncoding("GB2312"); StreamReader sr = new StreamReader(response.GetResponseStream(), enc);
string sHtml = sr.ReadToEnd();
sr.Close();
response.Close();
Console.WriteLine(sHtml );
}but if the returned html page is a frameset, apparently, you need to parse the html, retrieve the links and use the above method again to retrieve the real htmlGood luck!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货