function curlText($test_word,$wx_token){ $url = "https://api.weixin.qq.com/wxa/msg_sec_check?access_token=".$wx_token; $file_data = '{ "content":"'.$test_word.'" }';//$content(需要检测的文本内容,最大520KB) $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch , CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $file_data); $output = curl_exec($ch); curl_close($ch); return $output; }