算了,第一次来这里就这样,看来没人能解决这问题,来错地方了,版主删帖吧!
想弄个函数检测qq在线状态,代码如下:private string GetWebContent(string url) {
string WebContent="";
try
{
WebClient MyWebClient = new WebClient();
MyWebClient.Credentials = CredentialCache.DefaultCredentials;
Byte[] pageData = MyWebClient.DownloadData(url);
WebContent = Encoding.Default.GetString(pageData);
}
catch(WebException webex)
{
MessageBox.Show(webex.Message.ToString());
}
return WebContent;
}
用这个url:http://wpa.号码:3,无论要检测的qq号是否在线返回值总是GIF89aQ,但在浏览器里直接输入url却是不同的内容,百思不得其解,忘达人解答,不胜感激!
[[it] 本帖最后由 shenly2002 于 2008-8-18 11:29 编辑 [/it]]