多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` public function checkMsg($content = '') { if ($content == ''){ return true; } $accesstoken = $this->getAccessToken(); $data ['content'] = $content; $url = "https://api.weixin.qq.com/wxa/msg_sec_check?access_token=".$accesstoken; $res = $this->curl_post($url,json_encode($data,JSON_UNESCAPED_UNICODE)); $resArr = json_decode($res,true); if (isset($resArr['errcode']) && $resArr['errcode'] == 0){ return true; }else{ return false; } } ``` 文字过滤接口: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.msgSecCheck.html # security.msgSecCheck内容安全监测全返回成功 关于内容安全监测测试内容的问题,可以先自行确认以下问题: 1、是否采用post请求方式 2、是否已经把unicode转为utf-8   (参考链接:https://www.jb51.net/article/70251.htm) 3、内容安全监测主要是覆盖涉政,色情,违法这几类 链接 https://developers.weixin.qq.com/community/develop/doc/0004e88af9ccb04b2219d3b7751c09?highLine=%25E5%2586%2585%25E5%25AE%25B9%25E5%25AE%2589%25E5%2585%25A8%25E6%258E%25A5%25E5%258F%25A3%2520utf8