<?php
namespace app\api\controller;
use think\Controller;
use think\Db;
use think\Model;
use think\Loader;
class Rlrh20200812 extends Controller
{
//腾讯云人脸检测接口
public function detectFace($img)
{
header('Access-Control-Allow-Origin: *');
$secretId = "";
$secretKey = "";
$host = "iai.tencentcloudapi.com";
$service = "iai"; //这个参数就是host的前缀
$version = "2020-03-03";
$action = "DetectFace"; //方法
$region = "ap-beijing"; //地域
$timestamp = time();
$algorithm = "TC3-HMAC-SHA256";
//参数
$params = [
"MaxFaceNum"=>1,
"Image"=>$img,
];
$params = json_encode($params);
//签名
// step 1: build canonical request string
$httpRequestMethod = "POST&#
PHP 腾讯云 V3签名(以人脸融合为例)
最新推荐文章于 2024-05-28 18:06:05 发布