All Projects → CleanTalk → php-antispam

CleanTalk / php-antispam

Licence: other
A PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to php-antispam

mediawiki-antispam
Antispam extension for MediaWiki.
Stars: ✭ 15 (-70%)
Mutual labels:  spam, spam-protection, antispam
joomla2.x-antispam
Anti-spam plugin for Joomla 2.x
Stars: ✭ 10 (-80%)
Mutual labels:  spam-protection, antispam
ruby-antispam
API to have CleanTalk anti-spam on Ruby
Stars: ✭ 16 (-68%)
Mutual labels:  spam-protection, antispam
bitrix-antispam
1C Bitrix anti-spam mod.
Stars: ✭ 10 (-80%)
Mutual labels:  spam-protection, antispam
TLG AntiJoin2SpamBot
Telegram Bot that figths against Spammers who join groups to publish their annoying and unwanted info. The Bot will watch for all new users that join the group and don't let them to publish messages that contains URLs until they have been in the group long as an specific time, and they have written an enough number of messages (configurable).
Stars: ✭ 16 (-68%)
Mutual labels:  spam, antispam
Stop.Google.Analytics.Ghost.Spam.HOWTO
How to stop Google Analytics "Ghost" Spam using a well curated list of spam referrer domains and web sites. Simple and easy to use with instructions for creating Segments in Google Analytics using our google-exclude files.
Stars: ✭ 21 (-58%)
Mutual labels:  spam, spam-protection
wordpress-zero-spam
The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. Just install, activate, and say goodbye to spam.
Stars: ✭ 67 (+34%)
Mutual labels:  spam, spam-protection
v3
E.F.A version 3.x.x.x
Stars: ✭ 38 (-24%)
Mutual labels:  spam, spam-protection
blogspam-api
Implementation of the blogspam.net server in golang
Stars: ✭ 22 (-56%)
Mutual labels:  spam, spam-protection
Sms Bomber
A very, very simple sms bomber written in python and now java. You can adjust the amount of texts sent, and the interval at which they are sent (if you want any). For educational purposes only.
Stars: ✭ 91 (+82%)
Mutual labels:  spam
Discord Spam Bots
Discord spam bots with multiple account support, account creator, auto-join, proxies, mass direct message and more.
Stars: ✭ 173 (+246%)
Mutual labels:  spam
Sisyphus
Intelligent Junk Mail Handler
Stars: ✭ 76 (+52%)
Mutual labels:  spam
Wifi Spam
✉️📡 Spam thousands of WiFi access points with custom SSIDs
Stars: ✭ 92 (+84%)
Mutual labels:  spam
Sblam
Server-side HTTP spam filter
Stars: ✭ 37 (-26%)
Mutual labels:  spam-protection
Tbomb
This is a SMS And Call Bomber For Linux And Termux
Stars: ✭ 1,287 (+2474%)
Mutual labels:  spam
brutal-sms
Spam sms sampe nangis, 100% unlimited
Stars: ✭ 47 (-6%)
Mutual labels:  spam
Webwhatsappbot
Core to automatize whatsapp - working 11/2018
Stars: ✭ 59 (+18%)
Mutual labels:  spam
Wordpress Zero Spam
The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. Just install, activate, and say goodbye to spam.
Stars: ✭ 56 (+12%)
Mutual labels:  spam
ChatControl-Pro
The ultimate chat solution. Prevent spam, ads, swears and even bots on your server. Replaced by ChatControl Red: https://mineacademy.org/chatcontrol-red
Stars: ✭ 65 (+30%)
Mutual labels:  antispam
007spam Bot
auto report instagram accounts ( SPAM BOT )
Stars: ✭ 150 (+200%)
Mutual labels:  spam

php-antispam

Build Status

Latest Stable Version

A PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

How API stops spam?

API uses several simple tests to stop spammers.

  • Spam bots signatures.
  • Blacklists checks by Email, IP, web-sites domain names.
  • JavaScript availability.
  • Relevance test for the comment.

How API works?

API sends a comment's text and several previous approved comments to the servers. Servers evaluates the relevance of the comment's text on the topic, tests on spam and finaly provides a solution - to publish or put on manual moderation of comments. If a comment is placed on manual moderation, the plugin adds to the text of a comment explaining the reason for the ban server publishing.

Requirements

Sample SPAM test for user signup

<?php

session_start();

//require_once "vendor/autoload.php"; -- Composer

require_once "lib/Cleantalk.php";
require_once "lib/CleantalkHelper.php";
require_once "lib/CleantalkRequest.php";

use Cleantalk\Cleantalk;
use Cleantalk\CleantalkRequest;

// Take params from config
$config_url = 'http://moderate.cleantalk.org/api2.0/';
$auth_key = 'enter key'; // Set Cleantalk auth key

if (count($_POST)) {
    $sender_nickname = 'John Dow';
    if (isset($_POST['login']) && $_POST['login'] != '')
        $sender_nickname = $_POST['login'];

    $sender_email = '[email protected]';
    if (isset($_POST['email']) && $_POST['email'] != '')
        $sender_email = $_POST['email'];

    $sender_ip = null;
    if (isset($_SERVER['REMOTE_ADDR']))
        $sender_ip = $_SERVER['REMOTE_ADDR'];

    $js_on = 0; 
    if (isset($_POST['js_on']) && $_POST['js_on'] == date("Y"))
        $js_on = 1; 

    // The facility in which to store the query parameters
    $ct_request = new CleantalkRequest();

    $ct_request->auth_key = $auth_key;
    $ct_request->agent = 'php-api';
    $ct_request->sender_email = $sender_email; 
    $ct_request->sender_ip = $sender_ip; 
    $ct_request->sender_nickname = $sender_nickname; 
    $ct_request->js_on = $js_on;
    $ct_request->submit_time = time() - (int) $_SESSION['ct_submit_time'];

    $ct = new Cleantalk();
    $ct->server_url = $config_url; 

    // Check
    $ct_result = $ct->isAllowUser($ct_request);

    if ($ct_result->allow == 1) {
        echo 'User allowed. Reason ' . $ct_result->comment;
    } else {
        echo 'User forbidden. Reason ' . $ct_result->comment;
    }
    echo '<br /><br />';
}
else
{
    $_SESSION['ct_submit_time'] = time();
}
?>

<form method="post">
    <label for="login">Login:<label>
    <input type="text" name="login" id="login" />
    <br />
    <label for="email">Email:<label>
    <input type="text" name="email" id="email" value="" />
    <br />
    <input type="hidden" name="js_on" id="js_on" value="0" />
    <input type="submit" />
</form>

<script type="text/javascript">
    var date = new Date();

    document.getElementById("js_on").value = date.getFullYear(); 
</script>

Sample SPAM test for text comment

<?php

session_start();

//require_once "vendor/autoload.php"; -- Composer

require_once "lib/Cleantalk.php";
require_once "lib/CleantalkHelper.php";
require_once "lib/CleantalkRequest.php";

use Cleantalk\Cleantalk;
use Cleantalk\CleantalkRequest;

// Take params from config
$config_url = 'http://moderate.cleantalk.org/api2.0/';
$auth_key = 'enter key'; // Set Cleantalk auth key

if (count($_POST)) {
    $sender_nickname = 'John Dow';
    if (isset($_POST['login']) && $_POST['login'] != '')
        $sender_nickname = $_POST['login'];

    $sender_email = '[email protected]';
    if (isset($_POST['email']) && $_POST['email'] != '')
        $sender_email = $_POST['email'];

    $sender_ip = null;
    if (isset($_SERVER['REMOTE_ADDR']))
        $sender_ip = $_SERVER['REMOTE_ADDR'];

    $js_on = 0; 
    if (isset($_POST['js_on']) && $_POST['js_on'] == date("Y"))
        $js_on = 1; 
    
    $message = null; 
    if (isset($_POST['message']) && $_POST['message'] != '')
        $message = $_POST['message']; 

    // The facility in which to store the query parameters
    $ct_request = new CleantalkRequest();

    $ct_request->auth_key = $auth_key;
    $ct_request->agent = 'php-api';
    $ct_request->sender_email = $sender_email; 
    $ct_request->sender_ip = $sender_ip; 
    $ct_request->sender_nickname = $sender_nickname; 
    $ct_request->js_on = $js_on;
    $ct_request->message = $message;
    $ct_request->submit_time = time() - (int) $_SESSION['ct_submit_time'];

    $ct = new Cleantalk();
    $ct->server_url = $config_url; 

    // Check
    $ct_result = $ct->isAllowMessage($ct_request);

    if ($ct_result->allow == 1) {
        echo 'Message allowed. Reason ' . $ct_result->comment;
    } else {
        echo 'Message forbidden. Reason ' . $ct_result->comment;
    }
    echo '<br /><br />';
}
else
{
    $_SESSION['ct_submit_time'] = time();
}
?>

<form method="post">
    <label for="login">Login:<label>
    <input type="text" name="login" id="login" />
    <br />
    <label for="email">Email:<label>
    <input type="text" name="email" id="email" value="" />
    <br />
    <label for="message">Message:<label>
    <textarea name="message" id="message"></textarea>
    <br />
    <input type="hidden" name="js_on" id="js_on" value="0" />
    <input type="submit" />
</form>

<script type="text/javascript">
    var date = new Date();

    document.getElementById("js_on").value = date.getFullYear(); 
</script>

API Response description

API returns PHP object:

  • allow (0|1) - allow to publish or not, in other words spam or ham
  • comment (string) - server comment for requests.
  • id (string MD5 HEX hash) - unique request idenifier.
  • errno (int) - error number. errno == 0 if requests successfull.
  • errstr (string) - comment for error issue, errstr == null if requests successfull.
  • account_status - 0 account disabled, 1 account enabled, -1 unknown status.

Don't want to deal with all this?

Universal solution for any CMS or custom website: https://github.com/CleanTalk/php-uni

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].