From dfab3a086a21f63a4668209ecb11b02118d50053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 26 May 2023 19:51:14 +0200 Subject: ipranges fail if request fails --- skripti/ipranges.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skripti/ipranges.php b/skripti/ipranges.php index c1d0552..a387da9 100755 --- a/skripti/ipranges.php +++ b/skripti/ipranges.php @@ -9,7 +9,10 @@ $a = ""; $p = []; $c = []; -foreach (explode("\n", file_get_contents("https://ftp.ripe.net/pub/stats/ripencc/membership/alloclist.txt")) as $l) { +$response = file_get_contents("https://ftp.ripe.net/pub/stats/ripencc/membership/alloclist.txt"); +if ($response === false) + exit(1); +foreach (explode("\n", $response) as $l) { if ($l == "") continue; if ($l[0] != " ") { -- cgit v1.2.3