從別的網(wǎng)站上抓取數(shù)據(jù) 并存到自己的數(shù)據(jù)庫里怎么做到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結(jié)構(gòu)從http://api.showji.com/locating/Query.aspx?m=網(wǎng)站上抓舉 所屬省份和所屬城市和類型,希望各位net高手幫忙
- 2 回答
- 0 關(guān)注
- 1215 瀏覽