Control all text in multiple file bad words filter with worps

Overview

About Worps | PHP!

Control all text in multiple file bad words filter with worps

If you try online Click

What to do use for worps

  • Create new object
  • Worps constructor need files. Give files
  • Call convert method. Convert method need filter text
  • Convert method return filtered text.

Files Property

Giving files must are array and these arrays must be path property

"./files/bad.txt"], ["path" => "./files/empty.txt" , "separator" => ","] ); ">
$files = array(
	["path" => "./files/bad.txt"],
	["path" => "./files/empty.txt" , "separator" => ","]
);

If your files in each words not be new lines giving array inside separator property

Example File (not need separator property because each word new line)

File bad.txt

bad
word

Example File (need separator property because each word not new line and separator property must be value = " , " )

File empty.txt

bad,word

Usage Code

"./files/bad.txt"] );//Give as you want file with array $worps = new Worps($files); //Create new Worps object $text = $worps->convert("i am using bad words right now really BAD"); //convert method return filtered text use $text variable print($text);//Output : i am using *** words right now really *** ">
require  './worps.php'; //First we need source file.
$files = array(
["path" => "./files/bad.txt"]
);//Give as you want file with array

$worps = new Worps($files); //Create new Worps object
$text = $worps->convert("i am using bad words right now really BAD");
//convert method return filtered text use $text variable 
print($text);//Output : i am using *** words right now really ***

Methods

setHeader ( $header )

$worps->setHeader('Content-type: text/html; charset=utf-8')

getFiles

$worps->getFiles()

getFiles return all giving files

getRegExp

$worps->getRegExp()	

getRegExp return Regular expression has value. Default value = /\w+/

setRegExp ( $exp)

$worps->setRegExp('/\w+i/')

setShownText ( $length = null, $specialChar = false , $isShuffle = false)

$worps->setShownText(5,false,true)

setShownText method works filtered words how looks

  • $length parameter mean the filtered words how many letter hidden If you give null value filtered until words hidden self letter
  • $specialChar parameter mean the filtered words how look This parameter need array
    $worps->setShownText(null,['!','#','@'],false)
  • $isShuffle parameter mean the filtered words is shuffling

getText

$worps->getText()

This methods return giving not converted text

convert ( $text )

$text = $worps->convert("i am using bad words right now really BAD");
print($text)//i am using *** words right now really ***

This methods return converted (filtered) text

getConvertedText

$worps->getConvertedText()

This methods return converted (filtered) text This methods use before call convert method

getHiddenWordsGroup

getHiddenWordsGroup()) //Array ( [bad] => 2) ">
$text = $worps->convert("i am using bad words right now really BAD");
print($worps->getHiddenWordsGroup())
//Array ( [bad] => 2)

getHiddenWords ( $filter = null )

getHiddenWords()) //Array ( [0] => bad [1] => bad ) ">
$text = $worps->convert("i am using bad words right now really BAD");
print($worps->getHiddenWords())
//Array ( [0] => bad [1] => bad )
  • If $filter parameter giving return filtered words
getHiddenWords('break')) //Array () ">
   	$text = $worps->convert("i am using bad words right now really 	BAD");
   	print($worps->getHiddenWords('break'))
   	//Array ()

getAllWords ( $filter = null )

getAllWords()) //Array ( [0] => Array ( [0] => damn [1] => bad ) [1] => Array ( [0] => break ) ) ">
$text = $worps->convert("i am using bad words right now really BAD");
print($worps->getAllWords())
//Array ( [0] => Array ( [0] => damn [1] => bad ) [1] => Array ( [0] => break ) )
  • If $filter parameter not giving or giving null return all files in words.Else return giving files index words. This parameter accept file index.
getAllWords(0)) //Array([0] => damn [1] => bad) ">
   	$text = $worps->convert("i am using bad words right now really 	BAD");
   	print($worps->getAllWords(0))
   	//Array([0] => damn [1] => bad)

Screen Shoot

Uygulama Ekran Görüntüsü

You might also like...
Optimizes class loading performance by generating a single PHP file containing all of the autoloaded files.
Optimizes class loading performance by generating a single PHP file containing all of the autoloaded files.

Class Preloader for PHP This tool is used to generate a single PHP script containing all of the classes required for a specific use case. Using a sing

🔨 Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs.

PHP-Scoper PHP-Scoper is a tool which essentially moves any body of code, including all dependencies such as vendor directories, to a new and distinct

Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm

Ip2region是什么? ip2region - 准确率99.9%的离线IP地址定位库,0.0x毫秒级查询,ip2region.db数据库只有数MB,提供了java,php,c,python,nodejs,golang,c#等查询绑定和Binary,B树,内存三种查询算法。 Ip2region特性

Take control of your users in PHP

Disciple Take control of your users Installation Install via Composer: composer require decodelabs/disciple PHP version Please note, the final v1 rele

 Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..
Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Minimalist PHP frame for Core-Library, for Developing PHP application that gives you the full control of your application.

LazyPHP lightweight Pre-Made Frame for Core-library Install Run the below command in your terminal $ composer create-project ryzen/lazyphp my-first-pr

Opensource IPTV control panel

OpenSource IPTV copy .env.example to .env and edit to your environment composer install --no-dev php artisan sriptv:init Docker build: docker build .

This Statamic addon allows you to modify the tags rendered by the Bard fieldtype, giving you full control over the final HTML.

Bard Mutator This Statamic addon allows you to modify the tags rendered by the Bard fieldtype, giving you full control over the final HTML. You can ad

Owner
null
JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Eboubaker Eboubaker 2 Jul 31, 2022
Get the color from the words

wordcolor Installation The preferred way to install this extension is through composer. Either run php composer.phar require --prefer-dist light/wordc

__FresHmaN 1 Mar 24, 2016
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Sebastian Tschan 31.1k Dec 30, 2022
Laminas\Text is a component to work on text strings

laminas-text This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering

Laminas Project 38 Dec 31, 2022
Zend\Text is a component to work on text strings from Zend Framework

zend-text Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-text. Zend\Text is a component to work on text strings. It cont

Zend Framework 31 Jan 24, 2021
Hook-logger-plugin - Debug WordPress action / filter hooks.

hook-logger-plugin Easily debug WordPress action / filter hooks, finding where actions are called from and understanding the flow of execution. This p

bruce aldridge 4 Feb 5, 2022
php String Objects Chains like length,forEach,filter,replace,repalcAll much More.... Module

php String Objects Chains like length,forEach,filter,replace,repalcAll much More.... Module

im__koli 1 Mar 29, 2022
An autoscaling Bloom filter with ultra-low memory footprint for PHP

Ok Bloomer An autoscaling Bloom filter with ultra-low memory footprint for PHP. Ok Bloomer employs a novel layered filtering strategy that allows it t

Andrew DalPino 2 Sep 20, 2022
The best profanity filter for chat with api for plugin developers!

xqwtxon/ProfanityFilter is moving on ReinfyTeam/ProfanityFilter ProfanityFilter ?? A best profanity filter for pocketmine. Controls hate speech and bl

Ace Sobremont 4 Jul 11, 2022
:globe_with_meridians: List of all countries with names and ISO 3166-1 codes in all languages and data formats.

symfony upgrade fixer • twig gettext extractor • wisdom • centipede • permissions handler • extraload • gravatar • locurro • country list • transliter

Saša Stamenković 5k Dec 22, 2022