/**
* 内容审核
*/
function security_msg($content)
{
//获取appid,appsecret,access_token
$appid = '';
$appsecret = '';
$access_token = access_token($appid, $appsecret);
$url = 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token=' . $access_token;
$content = json_encode(['content' => $content], JSON_UNESCAPED_UNICODE); //需要json格式
$res = httpRequest($url, 'POST', $content);
$res1 = json_decode($res, true);
if ($res1['errcode'] == 0) {
return true;
} elseif ($res1['errcode'] == 87014) {
return false;
}
}
php 微信敏感内容审核
最新推荐文章于 2021-11-04 19:11:28 发布