GithubHelp home page GithubHelp logo

anti_addiction's Introduction

网络游戏防沉迷实名认证系统 SDK For PHP

自用临时写的,现在分享出来,需要php7以上。

方法写在 apps/api 下, apps/helpers 为脚手架。

目前集成了 zttp env 扩展库,后期根据需求计划增加mysql扩展。

Install

composer update -vvv
cp env.example .env

项目入口 public/index.php

nginx 伪静态规则:

try_files $uri $uri/ /index.php$is_args$args;

Use

防沉迷系统官方文档地址:https://wlc.nppa.gov.cn/fcm_company/index.html

防沉迷系统的配置在 .env 文件中。

接口说明

除了第三个接口传参有改变,前两个接口传参和官方接口相同,返回值都包裹在了本接口返回值 data 键下。

请求接口时只需要传body参数,header头和密文服务器都处理了。

本API返回值说明:

状态码 说明
200 请求成功
400 第三方API非成功返回值
401 第三方API远程请求失败
404 接口不存在
  1. 查询本地redis库,ai实名认证状态

  2. 认证提交

  3. 认证查询

  4. 行为上报

    {'no': '','si': '',......}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.