callPostApi($url, ['media' => $media], false, ['headers' => ['Content-Type: application/octet-stream']]); } /** * 异步校验图片/音频是否含有违法违规内容 * @param string $media_url * @param string $media_type * @return array * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function mediaCheckAsync($media_url, $media_type) { $url = 'https://api.weixin.qq.com/wxa/media_check_async?access_token=ACCESS_TOKEN'; return $this->callPostApi($url, ['media_url' => $media_url, 'media_type' => $media_type], true); } /** * 检查一段文本是否含有违法违规内容 * @param string $content * @return array * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function msgSecCheck($content) { $url = 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token=ACCESS_TOKEN'; return $this->callPostApi($url, ['content' => $content], true); } }