Akismet

This class allows any ASP 3.0 application to use the Akismet anti-comment spam service.  This service performs a number of checks on submitted data and returns whether or not the data is likely to be spam.  Please note that in order to use this class, you must have a valid WordPress API key.  They are free for non/small-profit types and getting one will only take couple of minutes.  For commercial use, please visit the Akismet commercial licensing page.

About

Summary
This class allows any ASP 3.0 application to use the Akismet anti-comment spam service.
Class version.
WordPress API key.
Blog address.
User comment data.
ASP Classes doesn’t have a constructor, so you must initialize the class manually.
Set Akismet permalink parameter.
Set Akismet comment_type parameter.
Set Akismet comment_author parameter.
Set Akismet comment_author_email parameter.
Set Akismet comment_author_url parameter.
Set Akismet comment_content parameter.
Test for spam.
This call is for submitting comments that weren’t marked as spam but should have been.
This call is intended for the marking of false positives, things that were incorrectly marked as spam.

Properties

version

Class version.

Contains

(float) version

wpApiKey

WordPress API key.

Contains

(hex) key

blog

Blog address.

Contains

(uri) blog address

comment

User comment data.

Contains

(String Dictionary) comment data

Functions

initialize

public sub initialize( key,
uri )

ASP Classes doesn’t have a constructor, so you must initialize the class manually.

Parameters

(hex) Wordpress API key
(uri) Blog address

Example

dim SpamSentinel : set SpamSentinel = new Akismet
SpamSentinel.initialize "123456789abc", "http://blog.domain.com"
set SpamSentinel = nothing

setPermalink

public sub setPermalink( value )

Set Akismet permalink parameter.

Parameters

(string) value

setCommentType

public sub setCommentType( value )

Set Akismet comment_type parameter.

Parameters

(string) value

setCommentAuthor

public sub setCommentAuthor( value )

Set Akismet comment_author parameter.

Parameters

(string) value

setCommentAuthorEmail

public sub setCommentAuthorEmail( value )

Set Akismet comment_author_email parameter.

Parameters

(string) value

setCommentAuthorUrl

public sub setCommentAuthorUrl( value )

Set Akismet comment_author_url parameter.

Parameters

(string) value

setCommentContent

public sub setCommentContent( value )

Set Akismet comment_content parameter.

Parameters

(string) value

isSpam

public function isSpam()

Test for spam.

Returns

true if Akismet thinks this post is a spam
false otherwise

Example

dim SpamSentinel : set SpamSentinel = new Akismet
SpamSentinel.initialize "123456789abc", "http://blog.domain.com"
SpamSentinel.setPermalink "http://blog.domain.com/entry-permalink/"
SpamSentinel.setCommentType "comment"
SpamSentinel.setCommentAuthor "Author"
SpamSentinel.setCommentAuthorEmail "author@isp.com"
SpamSentinel.setCommentAuthorUrl "http://author.isp.com"
SpamSentinel.setCommentContent "The content that was submit"
Response.write SpamSentinel.isSpam()
set SpamSentinel = nothing

submitSpam

public function submitSpam()

This call is for submitting comments that weren’t marked as spam but should have been.

Returns

(string) Akismet Service message.  Something like: “Thanks for making the web a better place.”

Example

dim SpamSentinel : set SpamSentinel = new Akismet
SpamSentinel.initialize "123456789abc", "http://blog.domain.com"
SpamSentinel.setPermalink "http://blog.domain.com/entry-permalink/"
SpamSentinel.setCommentType "comment"
SpamSentinel.setCommentAuthor "Author"
SpamSentinel.setCommentAuthorEmail "author@isp.com"
SpamSentinel.setCommentAuthorUrl "http://author.isp.com"
SpamSentinel.setCommentContent "The content that was submit"
Response.write SpamSentinel.submitSpam()
set SpamSentinel = nothing

submitHam

public function submitHam()

This call is intended for the marking of false positives, things that were incorrectly marked as spam.

Returns

(string) Akismet Service message.  Something like: “Thanks for making the web a better place.”

Example

dim SpamSentinel : set SpamSentinel = new Akismet
SpamSentinel.initialize "123456789abc", "http://blog.domain.com"
SpamSentinel.setPermalink "http://blog.domain.com/entry-permalink/"
SpamSentinel.setCommentType "comment"
SpamSentinel.setCommentAuthor "Author"
SpamSentinel.setCommentAuthorEmail "author@isp.com"
SpamSentinel.setCommentAuthorUrl "http://author.isp.com"
SpamSentinel.setCommentContent "The content that was submit"
Response.write SpamSentinel.submitHam()
set SpamSentinel = nothing
public sub initialize( key,
uri )
ASP Classes doesn’t have a constructor, so you must initialize the class manually.
public sub setPermalink( value )
Set Akismet permalink parameter.
public sub setCommentType( value )
Set Akismet comment_type parameter.
public sub setCommentAuthor( value )
Set Akismet comment_author parameter.
public sub setCommentAuthorEmail( value )
Set Akismet comment_author_email parameter.
public sub setCommentAuthorUrl( value )
Set Akismet comment_author_url parameter.
public sub setCommentContent( value )
Set Akismet comment_content parameter.
public function isSpam()
Test for spam.
public function submitSpam()
This call is for submitting comments that weren’t marked as spam but should have been.
public function submitHam()
This call is intended for the marking of false positives, things that were incorrectly marked as spam.