QQ HTTP Interface php Inquiry _php Tutorial

Source: Internet
Author: User
1. Research Notes

Tencent in the Tqq.tencent.com 8000 has a use of HTTP QQ interface, through this interface, you can do some basic operations, such as: login, log out, change the status of the login (online, busy, offline, stealth), add delete friends, view friends information, send verification information (Accept being added as a friend, apply for a friend, refuse to be added as a friend), send and receive user messages, System information.

At present, I am studying the 1.1 version of the HTTP QQ protocol, research is the results of micro-thread is waiting, dare not say anything beyond, but more detailed and accurate.

2, Interface Description:

Interface Location: tqq.tencent.com:8000

Communication protocol: HTTP

Data transfer method: POST

HTTP request Format:

POST http/1.1

host:tqq.tencent.com:8000

Content-type:text/plain; Charset=utf-8

Content-length: Length

Connection:close

Data

Where length is the length of the data, the format of the data:

ver=1.1&cmd= Command &seq= Mark &uin=qq number &

Each of the above 4 parameters is required for each request. Wherein, Ver represents the version of the agreement, currently 1.1, it is said that 1.2 has come out, the word of the confusion, the server returned null; CMD is the instruction of the operation, there are login, List, Query_stat, GetInfo, Addtolist, Ack_addtolist, Delfromlist, Change_stat, Getmsgex, Cltmsg, Logout; The SEQ is the token of the current request, prevents the recurrence of the send, can use the current time, or can use random numbers; UIn is the QQ number of the currently executing operation. However, different cmd needs different parameters, I will publish my research results below.

3. Research methods:

I am not satisfied with the information on the Internet, I write my own program, send many different parameters of the same CMD request, according to the return of the server, to make judgments. Interested friends can refer to, here can skip.

Below I publish my probing code (PHP):

$uin = "QQ number";

$PWD = MD5 ("QQ password");

Login Test

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m5=1&lc=9326b87b234e7235 ";

Note: The login test cannot be done at the same time, it must wait until the server thinks that QQ is disconnected before it can be tested, otherwise the result is not credible

/*******

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m5=0&lc=9326b87b234e7235 ";

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m5=1&lc=9326b87b234e7235 ";

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m5=2&lc=9326b87b234e7235 ";

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m5=3&lc=9326b87b234e7235 ";

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m6=1&lc=9326b87b234e7235 ";

$poststring [] = "ver=1.1&cmd=login&seq=". Rand (1000,9000). " &uin= ". $uin." &ps= ". $pwd." &m6=1&lc=1223423545756679 ";

*******/

Get a buddy list

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin;

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160&un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160&un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=list&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un=106814 ";

Get the online list

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin;

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160&un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=160&un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn= ". Rand (1,200)." &un=0 ";

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un= ". Rand (1,10);

$poststring [] = "ver=1.1&cmd=query_stat&seq=". Rand (1000,9000). " &uin= ". $uin." &tn=0&un=106814 ";

View friend Information

$poststring [] = "ver=1.1&cmd=getinfo&seq=". Rand (1000,9000). " &uin= ". $uin." &lv=0&un=106814 ";

$poststring [] = "ver=1.1&cmd=getinfo&seq=". Rand (1000,9000). " &uin= ". $uin." &lv=1&un=106814 ";

http://www.bkjia.com/PHPjc/486451.html www.bkjia.com true http://www.bkjia.com/PHPjc/486451.html techarticle 1, research shows that Tencent in Tqq.tencent.com 8000 has a use of HTTP QQ interface, through this interface, you can do some basic operations, such as: Landing, logout, change the status of the login ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.