PHP code example of quansitech / qs-sensitive
1. Go to this page and download the library: Download quansitech/qs-sensitive 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/ */
quansitech / qs-sensitive example snippets
composer
$sensitive = new Senstive();
$txt = "你是不是傻&吊。。。";
$words = $sensitive->filter($txt);
echo $words; // 你是不是***。。。
$disturbList = ['!', '(', ')'];
$words = './words.txt';
$sensitive = new Senstive($disturbList, $words);
$txt = "你是不是傻(!)吊。。。";
$words = $sensitive->filter($txt);
echo $words; //你是不是*****。。。