2021-05-21 01:12:10 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
echo "Downloading...\n";
|
2024-02-14 15:09:31 -07:00
|
|
|
file_put_contents(__DIR__ . "/bannedips.zip", file_get_contents("https://www.stopforumspam.com/downloads/listed_ip_7_ipv46.zip"));
|
2021-05-21 01:12:10 -06:00
|
|
|
file_put_contents(__DIR__ . "/toxic_ip_cidr.txt", file_get_contents("https://www.stopforumspam.com/downloads/toxic_ip_cidr.txt"));
|
2024-02-14 15:09:31 -07:00
|
|
|
file_put_contents(__DIR__ . "/toxic_domains_whole.txt", file_get_contents("https://www.stopforumspam.com/downloads/toxic_domains_whole.txt"));
|
2021-05-21 01:12:10 -06:00
|
|
|
|
|
|
|
$zip = new ZipArchive;
|
|
|
|
$res = $zip->open(__DIR__ . "/bannedips.zip");
|
|
|
|
if ($res === TRUE) {
|
2024-02-14 15:09:31 -07:00
|
|
|
$zip->extractTo(__DIR__ . "/");
|
|
|
|
$zip->close();
|
|
|
|
unlink(__DIR__ . "/bannedips.zip");
|
|
|
|
rename(__DIR__ . "/listed_ip_7_ipv46.txt", __DIR__ . "/bannedips.txt");
|
|
|
|
echo "Unzipped.\n";
|
2021-05-21 01:12:10 -06:00
|
|
|
} else {
|
2024-02-14 15:09:31 -07:00
|
|
|
echo "Unzip failed.\n";
|
2021-05-21 01:12:10 -06:00
|
|
|
}
|
2024-02-14 15:09:31 -07:00
|
|
|
echo "Done.\n";
|