Commit e7c0ec2f authored by Łukasz Gogołkiewicz's avatar Łukasz Gogołkiewicz
Browse files

update readme

parent ae2ae088
......@@ -6,48 +6,48 @@ How to use:
1. Add to composer.json:
{
"repositories": [
{
"url": "https://gitlab.middleearth.pl/createanduse/akismet.git",
"type": "git",
"reference": "master"
"repositories": [
{
"url": "https://gitlab.middleearth.pl/createanduse/akismet.git",
"type": "git",
"reference": "master"
}
],
"require": {
"createanduse/akismet": "@stable"
}
}
],
"require": {
"createanduse/akismet": "@stable"
}
}
2. Run:
composer update
composer update
3. In your code:
use CreateAndUse\Akismet\Akismet;
...
$akismet = new Akismet($apiKey, $appUrl);
use CreateAndUse\Akismet\Akismet;
...
$akismet = new Akismet($apiKey, $appUrl);
4. Verify key:
$isVerified = $akismet->verifyKey();
$isVerified = $akismet->verifyKey();
5. Check comment:
$params = [
'user_ip' => '127.0.0.1',
'user_agent' => 'User-Agent',
'referrer' => 'http://website.lan',
'permalink' => 'http://website.lan',
'comment_type' => 'comment',
'comment_author' => 'username',
'comment_author_email' => 'john@doe.org',
'comment_author_url' => 'http://website.lan',
'comment_content' => 'comment',
'blog_lang' => 'pl',
'blog_charset' => 'UTF-8',
];
$isSpam = $akismet->commentCheck($params);
$params = [
'user_ip' => '127.0.0.1',
'user_agent' => 'User-Agent',
'referrer' => 'http://website.lan',
'permalink' => 'http://website.lan',
'comment_type' => 'comment',
'comment_author' => 'username',
'comment_author_email' => 'john@doe.org',
'comment_author_url' => 'http://website.lan',
'comment_content' => 'comment',
'blog_lang' => 'pl',
'blog_charset' => 'UTF-8',
];
$isSpam = $akismet->commentCheck($params);
## It's so simple!
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment