public string GethtmlCode(string uri)
{
string tempGethtmlCode = null;
try
{
HttpWebRequest htmlr = HttpWebRequest.Create(uri);
htmlr.CookieContainer = new CookieContainer();
htmlr.CookieContainer.Add(new Uri(uri), QQCookie);
htmlr.UserAgent = “Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)”;
HttpWebResponse htmlc = htmlr.GetResponse();
IO.Stream stram = htmlc.GetResponseStream();
StreamReader readStream = new StreamReader(stram, System.Text.Encoding.UTF8);
tempGethtmlCode = readStream.ReadToEnd();
readStream.Close();
htmlc.Close();
}