GithubHelp home page GithubHelp logo

isabella232 / services_akismet2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pear/services_akismet2

0.0 0.0 0.0 67 KB

Home Page: http://pear.php.net/package/Services_Akismet2

PHP 100.00%

services_akismet2's Introduction

Services_Akismet2

This package provides an object-oriented interface to the Akismet REST API. The Akismet API is used to detect and to filter spam comments posted on weblogs.

There are several anti-spam service providers that use the Akismet API. To use the API, you will need an API key from such a provider. Example providers include Wordpress and TypePad.

Services_Akismet2 has been migrated from PEAR SVN.

Documentation

Quick Example

<?php

require_once 'Services/Akismet2.php';
require_once 'Services/Akismet2/Comment.php';

$comment = new Services_Akismet2_Comment(
    array(
        'comment_author'       => 'Test Author',
        'comment_author_email' => '[email protected]',
        'comment_author_url'   => 'http://example.com/',
        'comment_content'      => 'Hello, World!'
    )
);

$apiKey  = 'AABBCCDDEEFF';
$akismet = new Services_Akismet2('http://blog.example.com/', $apiKey);
if ($akismet->isSpam($comment)) {
    // rather than simply ignoring the spam comment, it is recommended
    // to save the comment and mark it as spam in case the comment is a
    // false positive.
} else {
    // save comment as normal comment
}

?>

Further Documentation

Bugs and Issues

Please report all new issues via the PEAR bug tracker.

Please submit pull requests for your bug reports!

Testing

To test, run either $ phpunit tests/ or $ pear run-tests -r

Building

To build, simply $ pear package

Installing

To install from scratch $ pear install package.xml

To upgrade $ pear upgrade -f package.xml

services_akismet2's People

Contributors

gauthierm avatar clockwerx avatar till avatar helgi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.