Download the PHP package jonexyz/qqconnect without Composer

On this page you can find all versions of the php package jonexyz/qqconnect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package qqconnect

QQConnect

只是为了方便自己写网站使用,官方的sdk包用起来很是不方便,每次使用都要翻看文档和示例。

也看过别人封装的代码,要么就只适用于TP5 要么就是不做修改的直接搬运官方sdk,使用方法Demo 也是没有,让我感觉用起来太麻烦了。

QQ互联,基于官方sdk包修改与封装,另许多框架都对session操作进行了重新封装,避免在框架中使用时无法读取$_SESSION数据,这里将不做任何的数据存储,access_token 的有效期维护,需要自行处理。

说明

官方文档 https://wiki.connect.qq.com/

  1. access_token 过期时间为30天。如果存储的access token过期,请重新走登录流程,access token 的数据缓存需自行维护。
  2. 代码中使用了 $_GET 全局变量获取数据。
  3. 代码不适用于 swoole 类型的常驻内存框架使用。
  4. 如需避免抛出的异常信息暴露给用户,建议使用 try{ }catch(){} 捕获。

业务流程

  1. 实例化 QC类 执行 qq_login() 方法, 会生成一个QQ的登陆URL,访问该URL,进行授权登陆。
  2. 授权登陆成功,会携带 code 跳转至设置的回调地址, 使用 qq_callback() 接收 code值,(code值是获取access_token的凭证),从而获取 access_token
  3. 凭借 access_token 获取 用户的 open_id
  4. 有了 access_token 与 open_id 执行 setKeysArr() 方法,设置接口的公共请求参数。
  5. 执行 get_user_info() 方法获取用户信息,写入数据表

食用说明, Laravel 代码示例


All versions of qqconnect with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jonexyz/qqconnect contains the following files

Loading the files please wait ....