You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
779 B
PHP

<?php
echo "Downloading...\n";
file_put_contents(__DIR__ . "/bannedips.zip", file_get_contents("https://www.stopforumspam.com/downloads/listed_ip_7_ipv46.zip"));
file_put_contents(__DIR__ . "/toxic_ip_cidr.txt", file_get_contents("https://www.stopforumspam.com/downloads/toxic_ip_cidr.txt"));
file_put_contents(__DIR__ . "/toxic_domains_whole.txt", file_get_contents("https://www.stopforumspam.com/downloads/toxic_domains_whole.txt"));
$zip = new ZipArchive;
$res = $zip->open(__DIR__ . "/bannedips.zip");
if ($res === TRUE) {
$zip->extractTo(__DIR__ . "/");
$zip->close();
unlink(__DIR__ . "/bannedips.zip");
rename(__DIR__ . "/listed_ip_7_ipv46.txt", __DIR__ . "/bannedips.txt");
echo "Unzipped.\n";
} else {
echo "Unzip failed.\n";
}
echo "Done.\n";