diff options
Diffstat (limited to 'api/php/api.php')
-rw-r--r-- | api/php/api.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/php/api.php b/api/php/api.php index 6fb329e..9033787 100644 --- a/api/php/api.php +++ b/api/php/api.php @@ -28,6 +28,11 @@ header("Content-Type: text/plain"); exit("400: Napaka. Izgleda, kakor da avtomatizirate zahteve. Koda napake: jebise"); } + if (strpos(@file_get_contents("b.txt"), "." . explode(".", $_SERVER["REMOTE_ADDR"])[0] . ".") !== FALSE) { + http_response_code(400); + header("Content-Type: text/plain"); + exit("400: Napaka. Izgleda, da ste na črnem seznamu. Kontaktirajte me."); + } $sporocilo = $_REQUEST['message']; $parent = $_REQUEST['parent']; if (strlen($sporocilo) > 1024 || strlen($parent) > 7+1+256+1+19 || strlen($vzdevek) > 256) { |