GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::AKISMET (3)

.ds Aq ’

NAME

Net::Akismet - Perl interface to Akismet - comment and trackback spam fighter

CONTENTS

SYNOPSIS



        my $akismet = Net::Akismet->new(
                        KEY => secret-baba-API-key,
                        URL => http://example.blog.net/,
                ) or die(Key verification failure!);

        my $verdict = $akismet->check(
                        USER_IP                         => 10.10.10.11,
                        COMMENT_USER_AGENT      => Mozilla/5.0,
                        COMMENT_CONTENT         => Run, Lola, Run, the spam will catch you!,
                        COMMENT_AUTHOR          => dosser,
                        COMMENT_AUTHOR_EMAIL    => dosser@subway.de,
                        REFERRER                => http://lola.home/,
                ) or die(Is the server here?);

        if (true eq $verdict) {

                print "I found spam. I am a spam-founder!\n";
        }



METHODS

<B>B>new()<B>B>


        Net::Akismet->new(PARAM => ...);



Acceptable parameters:
KEY The API key being verified for use with the API.
URL The front page or home URL of the instance making the request. For a blog or wiki this would be the front page.
USER_AGENT If supplied the value is prepended to this module’s identification string to become something like:



        your-killer-app/0.042 Perl-Net-Akismet/0.01 libwww-perl/5.8



Otherwise just Akismet Perl’s user agent string will be sent.

SERVICE_HOST If supplied, the host of the service API. The default is rest.akismet.com
SERVICE_VERSION If supplied, the API version. The default is 1.1

If verification of the key was unsuccessful new() returns undef.

<B>B>check()<B>B>


        $akismet->check(USER_IP => ..., COMMENT_CONTENT => ..., ...)



To be or not to be... check is meant to tell you. Give it enough details about the comment and expect true, false or undef as a result. true means <B>spamB>, false means <B>not spamB>, undef is returned on errror in submission of the comment.

Acceptable comment characteristics:
USER_IP <B>Required.B> Represents the IP address of the comment submitter.
COMMENT_USER_AGENT <B>Required.B> User agent string from the comment submitter’s request.
COMMENT_CONTENT Comment text.
REFERRER HTTP Referer header.
PERMALINK Permanent link to the subject of the comment.
COMMENT_TYPE May be blank, ’comment’, ’trackback’, ’pingback’, or a made up value like ’registration’.
COMMENT_AUTHOR Name of submitter.
COMMENT_AUTHOR_EMAIL Submitter e-mail.
COMMENT_AUTHOR_URL Submitter web page.

<B>B>spam()<B>B> Reports a certain comment as spam. Accepts the same arguments as check().

In case of failed submission returns undef, otherwise - a perl-known truth.

<B>B>ham()<B>B> This call is intended for the marking of false positives, things that were incorrectly marked as spam. It takes identical arguments as check() and spam().

In case of failed submission returns undef, otherwise - a perl-known truth.

NOTES

Although almost all comment characteristics are optional, performance can drop dramatically if you exclude certain elements. So please, supply as much comment detail as possible.

SEE ALSO

o http://akismet.com/
o http://akismet.com/development/api/

AUTHOR

Nikolay Bachiyski <nb@nikolay.bg>

    Help, modifications and bugfixes from:

o Peter Pentchev
o John Belmonte

COPYRIGHT AND LICENSE

Copyright (C) 2006, 2007, 2008 by Nikolay Bachiyski

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

$Id: Akismet.pm 38 2008-06-05 17:15:12Z humperdink $

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::AKISMET (3) 2008-06-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.