| 123456789101112131415161718192021222324252627282930 |
- <?php
- error_reporting(E_ALL);
- require_once 'action.php';
- require_once 'db.php';
- require_once 'token.php';
- $ip = ip2long(substr(trim($_GET['ip']),0,15));
- $token = substr(trim($_GET['token']),0,25);
- $action = substr(trim($_GET['action']),0,9);
- if (!(new token)->isClient($token)) {
- echo "client access denied";
- exit;
- }
- switch($action) {
- case 'delist':
- if((new action)->delist($ip)){
- echo long2ip($ip) . " delisted\n";
- } else {
- echo long2ip($ip) . " not delisted\n";
- };
- break;
- default:
- if((new action)->list($ip)){
- echo " inserted " . long2ip($ip) ."\n";
- } else {
- echo " fehler\n";
- };
- }
|