Perl, Python anti-spam API to web-site spam protection

Ready to use API for protecting web site from spam, to an existing class PHP, added antispam modules Perl and Python. Libraries enable you to check on the spam as a new comment and registration. Examples:

Perl API:
use strict;
    use WebService::Antispam;

    my $ct = WebService::Antispam->new({
                auth_key => '12345' # API key, please get on

    my $response = $ct->request({
        message => 'abc', # Comment visitor to the site
        example => undef, # The text of the article to which visitor created a comment.
        sender_ip => '', # IP address of the visitor
        sender_email => '*protected email*', # Email IP of the visitor
        sender_nickname => 'spam_bot', # Nickname of the visitor
        submit_time => 12, # The time taken to fill the comment form in seconds
        js_on => 1, # The presence of JavaScript for the site visitor, 0|1
Python API:
from cleantalk import CleanTalk

ct = CleanTalk(auth_key='yourkey')
ct_result = ct.request(
                message = 'abc', # Visitor comment
                sender_ip = '', # Visitor IP address
                sender_email = '*protected email*', # Visitor email
                sender_nickname = 'spam_bot', # Visitor nickname
                js_on = 1, # Is visitor has JavaScript
                submit_time = 12 # Seconds from start form filling till the form POST
if ct_result['allow']:
    print('Comment allowed. Reason ' + ct_result['comment'])
    print('Comment blocked. Reason ' + ct_result['comment'])

Python module compatible with the version of Python 2 and Python release 3. Soon to be available API platform .NET.

Perl anti-spam module to the web site

Python anti-spam module to the web site

Leave a Reply

Your email address will not be published. Required fields are marked *