Skip to content

Instantly share code, notes, and snippets.

<?php
// This is designed to be used with the IP list from
// https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt
//
// To use:
// $ipset = new IPSet("emerging-Block-IPs.txt");
// if ($ipset->check_ip($_SERVER['REMOTE_ADDR'])) {
// // Block the request
// }