Home >Backend Development >PHP Tutorial >Use PHP to implement QQ hang-up program_PHP tutorial

Use PHP to implement QQ hang-up program_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:58:46877browse

QQ hang-up is very popular nowadays. Recently I saw an expert wrote this piece of PHP code to implement QQ hang-up, so I would like to share it with you.

PHP code:

$qq = "100000"; //qq number

$pwd = "123456"; //Password

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //This line is to set whether curl follows the location sent by the header,
Important

curl_setopt($ch, CURLOPT_POST, 1);

//curl_setopt($ch, "Connection", "Keep-Alive");

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

curl_setopt($ch, CURLOPT_POSTFIELDS, "qq=".$qq."&pwd=".$pwd."&FromWhere=register");

$return = curl_exec($ch);

curl_close($ch);

echo strstr($return, "postfield") ? "Login failed" : "Login successful";

?>

Note: 1. Curl module support is required. 2. After logging in, your friends will see that you are online. 3. I don’t know how to log out.
The implementation of other languages ​​is similar, and interested friends can develop it themselves.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631981.htmlTechArticleQQ hangup is very popular nowadays. Recently, I saw an expert wrote such a piece of PHP code to implement QQ hangup, especially Take it out and share it with you. PHP code: php $qq = 100000; //qq number $pwd =...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn