There is a demand in the project, the request can import MSN and QQ contact person. MSN, there are open source jmsn and many other open source components. But QQ is still the way it is, and still not open API. Although the internet has found that there are lumaqq such open source
Agreement, but I down the toss for a long time, QQ did not log on, OK, I admit that I am a dull qualification. Time is urgent, too late to study carefully, so played the idea of QQ mailbox ~ ~
Since through the browser can login QQ mailbox, view contact person, then we can also use the program simulation browser login to get contact. Well, that sounds good, give it a try.
Logon request:
HTTP Code
POST/CGI-BIN/LOGIN?SID=0,2,ZH_CN http/1.1
Host:m126.mail.qq.com
user-agent:mozilla/5.0 (Windows; U Windows NT 6.0; ZH-CN; rv:1.9.0.13) gecko/2009073022 firefox/3.0.13 (. NET CLR 3.5.30729)
accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language:zh-cn,zh;q=0.5
Accept-encoding:gzip,deflate
accept-charset:gb2312,utf-8;q=0.7,*;q=0.7
keep-alive:300
Connection:keep-alive
Referer:http://mail.qq.com/cgi-bin/loginpage
cookie:verifysession=c6c09b326c4dac79b727c7e6e1069238e9bfe9ae6e7943e740a535af7cc57bddeacf1b617a15a912; pvid=5429125866; flv=10.0 R22; };
r_cookie=9828306541
content-type:application/x-www-form-urlencoded
content-length:371
sid=0%2c2%2czh_cn&firstlogin=false&starttime=1251436516205&redirecturl=&f=html&p= uyolx7jyspcnu9wcuk7qba2xjwo%2fo52fldnjnrabcnnlxi1ndwr8%2bqaepkt%
2fickhxmshwv4sjrxgvrta%2b1ehaooktxzcia%2fhp5qrrlgynoqzvci1x%2fsjwb4smjpzrwv%2b7weskuwclufenv% 2bmcq0ygonzi9univei7lyzgqxnxze%
3d&delegate_url=&s=&ts=1251436494&from=&uin=xxxxxxxx&aliastype=%40qq.com&pp= 000000000&verifycode=qmpb
Response:
HTTP Code
http/1.1 OK
Connection:close
Date:fri, Aug 2009 05:15:18 GMT
content-type:text/html; Charset=gbk
set-cookie:tinfo=1251436518.0550; domain=mail.qq.com; path=/
set-cookie:wimrefreshrun=; domain=mail.qq.com; path=/
set-cookie:autologin=expired; domain=mail.qq.com; path=/; Expires=fri, 28-aug-2009 05:17:18 GMT
set-cookie:sid=; domain=mail.qq.com; path=/; expires=wed, 31-dec-1969 23:59:59 GMT
set-cookie:sid=6449e26f4adc402ac5c80e08bec3ca6c; domain=mail.qq.com; path=/
Set-cookie:username=; domain=mail.qq.com; path=/; expires=wed, 31-dec-1969 23:59:59 GMT
set-cookie:username=xxxxxxxx; domain=mail.qq.com; path=/
set-cookie:qqmail_alias=xxxxxxxx@qq.com; domain=mail.qq.com; path=/
set-cookie:qqmail_sid=6449e26f4adc402ac5c80e08bec3ca6c; domain=qq.com; path=/
set-cookie:qqmail_username=xxxxxxxx; domain=qq.com; path=/
set-cookie:qqmail_domain=http://m126.mail.qq.com; domain=qq.com; path=/
set-cookie:qqmail_key=1_de7d3652ab10a1616175bf2aab152fb7010b0d06020602060309; domain=qq.com; path=/
set-cookie:ccshow=0000; domain=mail.qq.com; path=/; Expires=sun, 28-oct-2012 15:01:58 GMT
set-cookie:noteorg=; domain=mail.qq.com; path=/; Expires=sun, 28-oct-2012 15:01:58 GMT
set-cookie:foxacc=0; domain=mail.qq.com; path=/; Expires=sun, 28-oct-2012 15:01:58 GMT
set-cookie:edition=4m126.mail.qq.com; domain=mail.qq.com; path=/; Expires=sun, 28-oct-2012 15:01:58 GMT
Content-encoding:gzip
content-length:356