# sensitive-words **Repository Path**: code-lives/sensitive-words ## Basic Information - **Project Name**: sensitive-words - **Description**: 百度智能云敏感词检测【文本】 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-02 - **Last Updated**: 2022-09-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 百度智能云 敏感字检测 https://cloud.baidu.com/doc/ANTIPORN/s/Rk3h6xb3i ### config ``` $config = [ 'client_id' => '', 'client_secret' => '', ]; ``` ### 获取Token ``` $token = \Baidu\Sensitive\Words::getInstance()->config($config)->getToken(); echo $token['access_token'];die; ``` ### 检测文本敏感字 ``` $data = \Baidu\Sensitive\Words::getInstance()->config($config)->ckContent($token, "文本内容"); ``` ### 检测图片 ``` $data = \Baidu\Sensitive\Words::getInstance()->config($config)->ckImage($token, $image); ```