从别的网站上抓取数据 并存到自己的数据库里怎么做到
protected void btnselect_Click(object sender, EventArgs e)
{
GetStringByUrl("http://api.showji.com/locating/Query.aspx?m="+txtTEL.Text+"");
}
public string GetStringByUrl(string strUrl)
{
WebRequest wrt = WebRequest.Create(strUrl);
WebResponse wrse = wrt.GetResponse();
Stream strM = wrse.GetResponseStream();
StreamReader SR = new StreamReader(strM, Encoding.GetEncoding("utf-8"));
string strallstrm = SR.ReadToEnd();
lblCard0.Text = strallstrm;
TextBox1.Text = strallstrm;
return strallstrm;
}
上面是我写的代码asp.net的b/s结构
从http://api.showji.com/locating/Query.aspx?m=网站上抓举 所属省份和所属城市和类型,希望各位net高手帮忙
30秒到达战场