PHP code example of sy-records / baidu-textcensor

1. Go to this page and download the library: Download sy-records/baidu-textcensor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sy-records / baidu-textcensor example snippets


$appId = "";
$apiKey = "";
$secretKey = "";

$client = new \Luffy\TextCensor\Core($appId, $apiKey, $secretKey);
$res = $client->textCensorUserDefined("沈唁志博客:https://qq52o.me"); //待审核文本字符串

//具体参数说明见:https://ai.baidu.com/ai-doc/ANTIPORN/Nk3h6xbb2
var_dump($res);