PHP implements QQ login example code, phpqq login example_PHP tutorial

WBOY
Release: 2016-07-12 09:00:49
Original
1033 people have browsed it

PHP implements QQ login example code, phpqq login example

Share a piece of code that uses PHP to implement QQ login. The principle is to use curl to simulate sending post login, and the cookie is saved locally to achieve real 3GQQ login. The code theory here can support permanent single-listing of QQ-it is truly free to link to QQ.

<&#63;php
function qqlogin(){
$qqno='这里填写QQ账号';
$qqpw='这里填写QQ密码';
$cookie = dirname(__FILE__).'/cookie.txt';
$post = array( 
'login_url' => 'http://pt.3g.qq.com/s&#63;sid=ATAll43N7ZULRQ5V8zdfojol&aid=nLogin',
'q_from' => '', 
'loginTitle' => 'login', 
'bid' => '0', 
'qq' => $qqno, 
'pwd' => $qqpw, 
'loginType' => '1', 
'loginsubmit' => 'login',
);
$url = 'http://pt.3g.qq.com/handleLogin&#63;aid=nLoginHandle&sid=ATAll43N7ZULRQ5V8zdfojol';//请求url
$curl = curl_init();
curl_setopt($curl, CURLOPT_HEADER, 0); 
curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
// &#63;Cookie
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
$result = curl_exec($curl);
curl_close($curl);
}
&#63;>
qqlogin();
Copy after login

How to check whether the login is successful:

After running this code, your QQ will be squeezed out and the following prompt will pop up. At this time, you can log in to your other QQ numbers to check the login status of your test number.

Articles you may be interested in:

  • QQ login PHP OAuth sample code
  • PHP method to simulate QQ login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1091852.htmlTechArticlePHP implements QQ login example code, phpqq login example shares a piece of code that uses PHP to implement QQ login, the principle is to use curl Simulate sending post login and save the cookie locally to achieve real 3GQQ login...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template