<?php class qqlogin{ public $app_id; public $app_key; public $callback; public $code; public $state; public function __construct($app_id,$app_key,$callback){ $this->code = isset($_REQUEST['code'])? $_REQUEST['code'] : ''; $this->state = isset($_REQUEST['state'])? $_REQUEST['state'] : ''; $this->app_id = $app_id; $this->app_key = $app_key; $this->callback = $callback; }
1. First call the login method and send a request to Tencent.
2. Tencent carries the unique corresponding parameters OPENID and ACCESSTOKEN of this website and returns to the corresponding callback page.
3. The callback page accepts Tencent’s parameters. Finally, through these two parameters, the corresponding request is issued, such as querying the user's data.
4. Tencent performs corresponding operations, such as returning this user’s data to you
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
23 Feb 2024
Tencent Video can be logged in using QQ, so where is the QR code for QQ login? Users can click on the login interface, then choose to use other QQ to log in, and then click the scan code authorization login button on the lower right. This QQ login QR code location introduction can tell you the specific method. The following is a detailed introduction, come and take a look. Tencent Video usage tutorial Where is the QR code for Tencent Video QQ login? Answer: Click to scan the code to authorize login when logging in. Specific methods: 1. First, you need to enter the login interface and click QQ to log in. 2. Then click to log in with another QQ account. 3. Select the scan code on the lower right to authorize login.
08 Mar 2024
Tencent Video, as the leading online video platform in China, not only provides a large amount of high-quality film and television content, but also focuses on user experience and account security. Binding a mobile phone number is an important step to improve account security and is crucial for users. By binding their mobile phone numbers, users can better manage their Tencent Video accounts and enjoy a more convenient and secure movie-watching experience. So how do you bind your mobile phone number in Tencent Video? The following will bring you a detailed step-by-step guide, I hope it can help you! How to change Tencent Video QQ login to mobile phone number login answer: [Tencent Video]-[Personal Center]-[Click to log in]-[Bind mobile phone number]. Specific steps: 1. First open the Tencent video software, enter the homepage and click on the lower right corner
31 Mar 2023
In recent years, as the Internet continues to develop and grow, more and more websites have provided third-party login methods, and QQ login has become one of the more common login methods. In PHP language, third-party open source libraries are often used to implement QQ login. During development, we often encounter problems such as QQ account binding failure or username and password verification errors. This article will introduce some solutions. 1. QQ login principles and precautions QQ login is implemented through the OAuth2.0 protocol. The QQ open platform provides an SDK library, so QQ login is implemented in PHP.
09 Jun 2020
Since Tencent oauth sdk has been written too much and cannot be well combined with thinkphp, Tencent oauth sdk is written as an extension class of tp. In the __construct method, you can directly write your app_id, app_key and callback address.
28 Dec 2017
This article mainly introduces the simple verification login class implemented by PHP, which can realize basic PHP database query and password matching functions. I hope to be helpful.
26 May 2018
This article mainly introduces the method of implementing third-party login-QQ login in PHP. Interested friends can refer to it. I hope it will be helpful to everyone.
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images