資源簡介
PHP人工智能文本審核垃圾內容
代碼片段和文件信息
/*
文本審核
文檔地址?http://xuan2001.top/fun/ai/public/Content.php
時間?2019/2/16
QQ?1741415746?微信公眾?zxwljs
官網?http://api.xuan2001.top
*/
$url?=?“http://api.xuan2001.top/content/index.php“;//API地址
$content?=?“小哥*鴿*,來嘛,我得維*。信xxxx6666?“;//要審核的文本
$url_data?=?$url.“?content={$content}“;//GET地址
$json_data?=?UrlOpen($url_data);?//獲取數據
$json?=?json_decode($json_data);//解析json數據為php變量
$json_msg?=?$json->msg;//msg?返回信息
$json_result?=?$json->result;//返回的信息
//?調用
if($json_result?==?‘pass‘){
echo?“通過“;
}elseif($json_result?==?“notpass“){
$json_logid?=?$json->logid;
$json_content?=?$json->content;
echo“不通過,日志id:[{$json_logid}]不通過內容:[{$json_content}]“;
}
/*********************************************************************/
function?UrlOpen($url?$config?=?array())//
- 上一篇:微信小程序:投票小程序源碼
- 下一篇:PHP人工智能語音合成類
評論
共有 條評論