From 3486043827326cb7a89cea7e85f2a8873692f21c Mon Sep 17 00:00:00 2001 From: Christian Paulus <4321938f539685a03931dfdb72550d02fb9839bd@cloudflare.com> Date: Fri, 2 Apr 2021 07:42:16 +0200 Subject: [PATCH] example.json.is_cloudflare.php --- tool/example.json.is_cloudflare.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/example.json.is_cloudflare.php b/tool/example.json.is_cloudflare.php index 0d711e63..9ea90ca6 100644 --- a/tool/example.json.is_cloudflare.php +++ b/tool/example.json.is_cloudflare.php @@ -18,7 +18,7 @@ How to use json file */ function is_listed_cf($domain) { - if (!in_array(substr($domain, 0, 1), ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], true)) { + if (!in_array($domain[0], ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], true)) { return [false, false]; } $got = @json_decode(file_get_contents('/path/to/jsonfiles/cloudflare_' . $domain[0] . '.json'), true);