request('https://luckycola.com.cn/tools/sensiWords', json_encode($post)); $result = $http->get_data(); $json = json_decode($result, true); if ($json === null) return '内容分析请求失败'; if ($json['code'] != 0) return $json['msg']; if($json['isPass'] == true) return true; savelogfile('bakword', $result); return '有违禁词,不能发布'; //{"code":-99,"msg":"colaKey无效","data":{}} //{"code":0,"msg":"检测成功","isPass":true,"data":{"words":[],"text":"asdfsadf"}} //{"code":0,"msg":"检测成功","isPass":false,"data":{"words":["法轮","法轮大法"],"text":"法轮大法好啊啊阿萨德"}} } }