.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Net::Akismet 3pm" .TH Net::Akismet 3pm "2017-06-24" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Akismet \- Perl interface to Akismet \- comment and trackback spam fighter .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& my $akismet = Net::Akismet\->new( \& KEY => \*(Aqsecret\-baba\-API\-key\*(Aq, \& URL => \*(Aqhttp://example.blog.net/\*(Aq, \& ) or die(\*(AqKey verification failure!\*(Aq); \& \& my $verdict = $akismet\->check( \& USER_IP => \*(Aq10.10.10.11\*(Aq, \& COMMENT_USER_AGENT => \*(AqMozilla/5.0\*(Aq, \& COMMENT_CONTENT => \*(AqRun, Lola, Run, the spam will catch you!\*(Aq, \& COMMENT_AUTHOR => \*(Aqdosser\*(Aq, \& COMMENT_AUTHOR_EMAIL => \*(Aqdosser@subway.de\*(Aq, \& REFERRER => \*(Aqhttp://lola.home/\*(Aq, \& ) or die(\*(AqIs the server here?\*(Aq); \& \& if (\*(Aqtrue\*(Aq eq $verdict) { \& \& print "I found spam. I am a spam\-founder!\en"; \& } .Ve .SH "METHODS" .IX Header "METHODS" .IP "\fB\f(BInew()\fB\fR" 8 .IX Item "new()" .Vb 1 \& Net::Akismet\->new(PARAM => ...); .Ve .Sp Acceptable parameters: .RS 8 .IP "\s-1KEY\s0" 4 .IX Item "KEY" The \s-1API\s0 key being verified for use with the \s-1API.\s0 .IP "\s-1URL\s0" 4 .IX Item "URL" The front page or home \s-1URL\s0 of the instance making the request. For a blog or wiki this would be the front page. .IP "\s-1USER_AGENT\s0" 4 .IX Item "USER_AGENT" If supplied the value is prepended to this module's identification string to become something like: .Sp .Vb 1 \& your\-killer\-app/0.042 Perl\-Net\-Akismet/0.01 libwww\-perl/5.8 .Ve .Sp Otherwise just Akismet Perl's user agent string will be sent. .IP "\s-1SERVICE_HOST\s0" 4 .IX Item "SERVICE_HOST" If supplied, the host of the service \s-1API.\s0 The default is rest.akismet.com .IP "\s-1SERVICE_VERSION\s0" 4 .IX Item "SERVICE_VERSION" If supplied, the \s-1API\s0 version. The default is 1.1 .RE .RS 8 .Sp If verification of the key was unsuccessful \f(CW\*(C`new()\*(C'\fR returns \f(CW\*(C`undef\*(C'\fR. .RE .IP "\fB\f(BIcheck()\fB\fR" 8 .IX Item "check()" .Vb 1 \& $akismet\->check(USER_IP => ..., COMMENT_CONTENT => ..., ...) .Ve .Sp To be or not to be... \f(CW\*(C`check\*(C'\fR is meant to tell you. Give it enough details about the comment and expect \f(CW\*(Aqtrue\*(Aq\fR, \f(CW\*(Aqfalse\*(Aq\fR or \f(CW\*(C`undef\*(C'\fR as a result. \f(CW\*(Aqtrue\*(Aq\fR means \fBspam\fR, \f(CW\*(Aqfalse\*(Aq\fR means \fBnot spam\fR, \f(CW\*(C`undef\*(C'\fR is returned on error in submission of the comment. .Sp Acceptable comment characteristics: .RS 8 .IP "\s-1USER_IP\s0" 4 .IX Item "USER_IP" \&\fBRequired.\fR Represents the \s-1IP\s0 address of the comment submitter. .IP "\s-1COMMENT_USER_AGENT\s0" 4 .IX Item "COMMENT_USER_AGENT" \&\fBRequired.\fR User agent string from the comment submitter's request. .IP "\s-1COMMENT_CONTENT\s0" 4 .IX Item "COMMENT_CONTENT" Comment text. .IP "\s-1REFERRER\s0" 4 .IX Item "REFERRER" \&\s-1HTTP \s0\f(CW\*(C`Referer\*(C'\fR header. .IP "\s-1PERMALINK\s0" 4 .IX Item "PERMALINK" Permanent link to the subject of the comment. .IP "\s-1COMMENT_TYPE\s0" 4 .IX Item "COMMENT_TYPE" May be blank, 'comment', 'trackback', 'pingback', or a made up value like 'registration'. .IP "\s-1COMMENT_AUTHOR\s0" 4 .IX Item "COMMENT_AUTHOR" Name of submitter. .IP "\s-1COMMENT_AUTHOR_EMAIL\s0" 4 .IX Item "COMMENT_AUTHOR_EMAIL" Submitter e\-mail. .IP "\s-1COMMENT_AUTHOR_URL\s0" 4 .IX Item "COMMENT_AUTHOR_URL" Submitter web page. .RE .RS 8 .RE .IP "\fB\f(BIspam()\fB\fR" 8 .IX Item "spam()" Reports a certain comment as spam. Accepts the same arguments as \f(CW\*(C`check()\*(C'\fR. .Sp In case of failed submission returns \f(CW\*(C`undef\*(C'\fR, otherwise \- a perl-known truth. .IP "\fB\f(BIham()\fB\fR" 8 .IX Item "ham()" This call is intended for the marking of false positives, things that were incorrectly marked as spam. It takes identical arguments as \f(CW\*(C`check()\*(C'\fR and \f(CW\*(C`spam()\*(C'\fR. .Sp In case of failed submission returns \f(CW\*(C`undef\*(C'\fR, otherwise \- a perl-known truth. .SH "NOTES" .IX Header "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. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 http://akismet.com/ .IP "\(bu" 4 http://akismet.com/development/api/ .SH "AUTHOR" .IX Header "AUTHOR" Nikolay Bachiyski .SS "Help, modifications and bugfixes from:" .IX Subsection "Help, modifications and bugfixes from:" .IP "\(bu" 4 Peter Pentchev .IP "\(bu" 4 John Belmonte .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2006, 2007, 2008 by Nikolay Bachiyski .PP 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. .PP \&\f(CW$Id:\fR Akismet.pm 38 2008\-06\-05 17:15:12Z humperdink $