using System.Net;
using System.IO;
public static string GetWebContentString(string
url)
{
HttpWebRequest httpReq =
(HttpWebRequest)WebRequest.Create(url);
HttpWebResponse httpRes =
(HttpWebResponse)httpReq.GetResponse();
Stream fs =
httpRes.GetResponseStream();
StreamReader sr = new
StreamReader(fs);
return sr.ReadToEnd();
}
No comments:
Post a Comment