forked from HPR/hpr_hub
A series of changes to automate the checking of comments - resulting in a returned json file and standard responses for different actions
This commit is contained in:
@@ -13,4 +13,10 @@ $mailerPassword = 'THE_SMTP_MAIL_PASSWORD_HERE';
|
||||
|
||||
$hubBaseurl = "https://hub.hackerpublicradio.org/";
|
||||
$baseurl = "https://hackerpublicradio.org/";
|
||||
|
||||
$naughtyfile = '/path/to/naughty.txt';
|
||||
$naughty_stings_file = '/path/to/strings.txt';
|
||||
$justification_file = '/path/to/justification.txt';
|
||||
# Read more: http://vidiame.com/php/how-to-block-multiple-ip-addresses-using-php
|
||||
|
||||
?>
|
||||
|
@@ -287,8 +287,6 @@ function getUserIP()
|
||||
}
|
||||
return $ip . "\t" . $_SERVER['REQUEST_URI'] . "\t" . $_SERVER["HTTP_USER_AGENT"] . "\n";
|
||||
}
|
||||
$naughtyfile = '/home/hpr/logs/naughty-ip.txt';
|
||||
# Read more: http://vidiame.com/php/how-to-block-multiple-ip-addresses-using-php
|
||||
|
||||
if ( strlen($_SERVER['QUERY_STRING']) > 15 ) {
|
||||
file_put_contents($naughtyfile, getUserIP(), FILE_APPEND | LOCK_EX );
|
||||
|
Reference in New Issue
Block a user