liujinyong/tencent-v3-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

liujinyong/tencent-v3-api

Composer 安装命令:

composer require liujinyong/tencent-v3-api

包简介

base on tencent-api V3 version

README 文档

README

base on tencent-api V3 version.

安装

$ composer require liujinyong/tencent-v3-api 

配置

在使用本扩展之前,请先注册腾讯云账号,获取secretId和secretKey,及创建相应的人员库.

<?php

  require __DIR__ . '/vendor/autoload.php';

    $secretId  = "";
    $secretKey = "";
    $userHearderImg = "";
    $groupId = "";
    $pushUrl = "";
    $pullUrl = ""
    $key = "";
    //创建人员库
    $people    = new \Liujinyong\TencentV3Api\Lib\People($secretId, $secretKey);
    $res       = $people->CreatePerson("user1", "26", $userHearderImg, $groupId);
    
    //删除人员库
    $res       = $people->DeletePersonFromGroup("26", $groupId);
    
    //验证人脸
    $face = new \Liujinyong\TencentV3Api\Lib\Face($secretId, $secretKey);
    $res = $face->VerifyFace("user1", $userHearderImg);
    
    //获取直播推拉流地址
    $live = new \Liujinyong\TencentV3Api\Lib\Live($secretId,$secretKey,$pushUrl,$pullUrl);
    $res = $live->getLiveUrl("live","ceshi1",$key,"2022-04-10 17:33:00",true);
    
    //创建直播录制任务
    $res = $live->createRecordTask("luzhi",$pushUrl,"live",1649732129);
    
    
    //根据流名称查询在线人数
    $res = $live->DescribeStreamPlayInfoList("aaa");
    
    //终止直播录制任务
    $taskId = "";
    $res = $live->stopRecordTask($taskId);
    
    //创建视频审核任务
    $callBack = "";
    $bizType = "";
    $security = new \Liujinyong\TencentV3Api\Lib\Security($secretId,$secretKey);
    $res = $security->createVideoSecurityTask("bbb",$pullUrl,$bizType,$callBack);
    
    //终止视频审核任务
    $taskIdforVideo = "";
    $res = $security->cancelTask($taskIdforVideo);
    
    //名片识别接口
    $ocr = new \Liujinyong\TencentV3Api\Lib\Ocr($secretId,$secretKey);
    $res = $ocr->BusinessCardOCR($imageUrl);
    
    //文本内容安全接口
    $client = new \Liujinyong\TencentV3Api\Lib\ContentSecurity($secretId,$secretKey);
    $res = $client->check("社会主义价值观");
    
    
    //图片内容安全接口
    $client = new \Liujinyong\TencentV3Api\Lib\ImageSecurity($secretId,$secretKey);
    $res = $client->checkSync("ImageUrl","Target_id");
    
  

Usage

1.在config文件里添加secretId和secretKey配置项

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固