Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atakde/akismet-php

A php package for akismet with PHP 8
https://github.com/atakde/akismet-php

akismet akismet-api akismet-php akismet-php-library akismet-php-package php8 spam-checker

Last synced: 10 days ago
JSON representation

A php package for akismet with PHP 8

Awesome Lists containing this project

README

        

# akismet-php

A php package for akismet with PHP8.

## Installation

Install via composer

```bash
composer require atakde/akismet-php
```

## Usage

```php

require 'vendor/autoload.php';

$akismetPHP = new \Atakde\AkismetPhp\AkismetPhp();
$akismetPHP->setAkismetKey('YOUR_API_KEY')
->setCommentAuthor('Atakan')
->setCommentAuthorEmail('[email protected]')
->setCommentAuthorUrl('https://atakann.com')
->setCommentContent('This is a test comment')
->setBlogUrl('https://atakann.com')
->setPermalink('https://atakann.com')
->setReferrer('https://atakann.com')
->setCommentType('comment');

var_dump($akismetPHP->checkSpam());

```