Currently we support two method, Check and Sanitize. Check method is used when you only want to check is the submitted text are clean or not. Sanitize method is used when you want to sanitize your submitted text with replaced character.
With our simple REST API, you can easily to configure :
We highly recommend you to use this method for fast processing time and accuracy
http://green.tandif.com/api/v1/text/check?api_key=your_api_key_here&text=your_text_here
Your API_KEY. you can grab from tandif dashboard.
the text that you want to moderated/filtered by tandif.
http://green.tandif.com/api/v1/text/check?api_key=xxxxxxxx&text=fuck my ass and my dick
{
"result": "dirty"
}
Still Beta, We not recommend you to use this method, Please use Check method for fast processing time and accuracy
http://green.tandif.com/api/v1/text/sanitize?api_key=your_api_key_here&text=your_text_here&replacement=***
Your API_KEY. you can grab from tandif dashboard.
the text that you want to moderated/filtered by tandif.
default = ***. This is the character that tandif will replace(sanitize) a detected word or domain. if don't set this parameter, tandif will automatic set to ***
http://green.tandif.com/api/v1/text/sanitize?api_key=xxxxxxxx&text=fuck my ass and my dick&replacement=***
{
"result": "*** my *** and my ***"
}
$api_key = 'your_api_key';
$text = 'your text here';
$fullPath = "http://green.tandif.com/api/v1/text/check?api_key=$api_key&text=".urlencode($text);
$content = @file_get_contents($fullPath);
if($content!==FALSE){
$result = json_decode($content, true);
echo $result['result'];
} else {
echo 'check you internet connection';
}
Currently Tandif support English and Indonesia. soon our team will add more language support. You can activate language support for you License from tandif dashboard.