<?php
//引用config.php
include 'config.php';
$params = array(
'appId' => $appId,
'timestamp' => $timestamp,
'channelId' => '123456',
'passType' => 'id',
'id' => 'sdadada'
);
//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;
$url = "https://api.polyv.net/live/v3/channel/chat/pass-censor-content?".http_build_query($params);
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>