-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
76 lines (55 loc) · 2.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
* Botbouncer class
* Author: Michiel Dethmers, phpList Ltd, http://www.phplist.com
* Version 0.1 - 24 August 2011
* License: LGPL (Lesser Gnu Public License) http://www.gnu.org/licenses/lgpl-3.0.html
* Free to use, distribute and modify in Open as well as Closed Source software
* NO WARRANTY WHATSOEVER!
* ---------------
*
* For more information and how to set up and configure, http://www.phplist.com/formspamclass
*
* This class can be used to stop spammers from cluttering your database with bogus signups
* posts, comments and whatever else
*
* It currently uses three services, stopforumspam.com, project honeypot and akismet
* If you know of any other services that can be integrated, let me know.
******** Introduction *********
This class is an attempt to centralise a few anti form spam services on the Internet.
For now, it supports:
* http://www.stopforumspam.com - the Stop Forum Spam service
* http://www.projecthoneypot.org/ - The Honeypot Project
* http://www.akismet.com - The comment spam service from Wordpress
* https://getipintel.net/ - IP Intel
************ Configuration **************
To configure, load the following GLOBALS in your application environment. Generally it's easiest to put
this in the "Config file" of the application:
$GLOBALS['honeyPotApiKey'] = 'abcdefghij'; ## Your Key from the Honeypot Project
$GLOBALS['akismetApiKey'] = 'abcdefghij'; ## Your Key from the Akismet Service
$GLOBALS['akismetBlogURL'] = 'http://yoursite.com'; ## Your website URL
$GLOBALS['logRoot'] = '/tmp'; ## Where to write logfiles
$GLOBALS['ipIntelContact'] = '[email protected]'; ## Your e-mail (enables IP Intel)
$GLOBALS['sfsEnabled'] = true; ## Set false to disable Stop Forum Spam check (defaults to true (enabled))
## to avoid overloading the API services, use a memcached service
## calls will be cached for a day
$GLOBALS['memCachedServer'] = 'localhost:11211';
## An array for triggers on spam elements. This is primarily used for the SFS service
## it will default to the one below, you can leave it out if you want
$ForumSpamBanTriggers = array (
'username' => array ( // ban on username
'ban_end' => FALSE, // Permanent ban
'freq_tolerance' => 2, // allow when 2 or less in the frequency API field
'ban_reason' => 'You have been identified as a spammer.',
),
'email' => array ( // ban on email
'ban_end' => FALSE, // Permanent ban
'freq_tolerance' => 0,
'ban_reason' => 'You have been identified as a spammer. ',
),
'ip' => array ( // ban on ip address
'ban_end' => 630000, // 60*60*24*7 ban for 7 days
'freq_tolerance' => 1,
'ban_reason' => 'You have been identified as a spammer.',
)
);
************** Usage ****************
For now, check the "tests.php" file to see some examples of how to call the class.