PHP Implementation QQ Login Instance code _php instance

Source: Internet
Author: User

Share a section of the use of PHP to achieve QQ login code, the principle is to use Curl analog send post login, cookies save local, realize the real 3GQQ landing. Here code theory can support permanent single hanging qq-really do free hanging qq OH.

<?php
function Qqlogin () {
$qqno = ' Fill in QQ account here ';
$QQPW = ' Here fill in QQ password ';
$cookie = DirName (__file__). ' /cookie.txt ';
$post = Array ( 
' Login_url ' => ' http://pt.3g.qq.com/s?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?aid=nLoginHandle&sid=ATAll43N7ZULRQ5V8zdfojol ';//request 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);
// ? Cookie
curl_setopt ($curl, Curlopt_post, 1);
curl_setopt ($curl, Curlopt_postfields, Http_build_query ($post));
$result = curl_exec ($curl);
Curl_close ($curl);
>
qqlogin ();

How to see if login succeeded:

After running this code, your QQ will be squeezed out, pop-up the following prompts, this time you can log on to your other QQ number to see your test number landing status.

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.