public
Description: This extension only implement the API to have in Coppermine Gallery the possibility to block spammer's with data from "Project Honey Pot", you need get a key from "Project Honey Pot" website.
Homepage: http://tuxsoul.github.com/cpg-httpbl
Clone URL: git://github.com/tuxsoul/cpg-httpbl.git
Click here to lend your support to: cpg-httpbl and make a donation at www.pledgie.com !
cpg-httpbl / codebase.php
100644 53 lines (44 sloc) 1.792 kb
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
<?php
/*
******************************************************************************
CPG-HttpBL Plugin
******************************************************************************
Author: Mario Oyorzabal Salgado
Blog: http://blog.tuxsoul.com/
E-mail: <tuxsoul@tuxsoul.com>
Web: http://code.google.com/p/cpg-dnsbl/
Donate: http://tinyurl.com/36mzoa
******************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
******************************************************************************
*/
 
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
 
define ('CPG_HTTPBL_CWD', dirname(__FILE__));
 
// project honey pot core
include (CPG_HTTPBL_CWD . '/httpbl.php');
// Instance object api project honey pot
$httpbl = new objectHttpBL();
// If visitor evil ?
$httpbl->httpblStart();
 
// Add a filter for the gallery
// Show url traps in the code
$thisplugin->add_filter('gallery_header','cpg_httpbl_traps_top');
$thisplugin->add_filter('gallery_footer','cpg_httpbl_traps_footer');
 
// Filters code
// Add url traps in the top
function cpg_httpbl_traps_top (&$html) {
return cpg_httpbl_traps() . $html;
}
 
// Add url traps in the footer
function cpg_httpbl_traps_footer (&$html) {
return cpg_httpbl_traps() . $html;
}
 
// Add url traps in the html code
function cpg_httpbl_traps () {
$httpbl = new objectHttpBL();
return $httpbl->httpblGetUrlTrap();
}
 
?>