日期:2014-05-17  浏览次数:20447 次

怎么获取qq空间 最近访问人列表
有没有谁研究过
给点思路

通过登录自己的qq号,获取最近访问人信息
在aspx或者winform怎么实现啊

------解决方案--------------------
帮顶 没弄过.
------解决方案--------------------
用WebClient控件可以模拟登录, 登录后打开"最近访问人"的功能页面,下载回来正则取出即可啦
------解决方案--------------------
http://g.qzone.qq.com/cgi-bin/friendshow/friendshow_font_recent_visitor?uin=号码
------解决方案--------------------
1. /// <summary>
/// 获得验证码
/// </summary>
/// <param name="url">验证码地址</param>
/// <param name="encoding">编码</param>
/// <param name="myCookie">cookie</param>
/// <returns></returns>
public System.Drawing.Image GetImg(string url, string encoding,CookieContainer myCookie)
{
System.Drawing.Image img = null;
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
myRequest.Credentials = CredentialCache.DefaultCredentials;
myRequest.CookieContainer = myCookie;
myRequest.Accept = "*/*";
myRequest.Method = "GET";
myRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6; .NET CLR 2.0.50727; CIBA)";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.KeepAlive = true;
myRequest.UseDefaultCredentials = true;

HttpWebResponse response = (HttpWebResponse)myRequest.GetResponse();
Stream responseStream = response.GetResponseStream();
img = System.Drawing.Image.FromStream(responseStream);
StreamReader readStream = new StreamReader(responseStream, System.Text.Encoding.GetEncoding(encoding));
string pagecheckstring = readStream.ReadToEnd();
return img;
}