diff options
author | Christian Paulus <4321938f539685a03931dfdb72550d02fb9839bd@cloudflare.com> | 2021-04-02 07:42:16 +0200 |
---|---|---|
committer | Christian Paulus <4321938f539685a03931dfdb72550d02fb9839bd@cloudflare.com> | 2021-04-02 07:42:16 +0200 |
commit | 3486043827326cb7a89cea7e85f2a8873692f21c (patch) | |
tree | 2081caf1b0541c587e1422b8e9c53ddd7f18051a | |
parent | 87adff59c191886164952530de92e006b4d2ab60 (diff) | |
download | cloudflare-tor-3486043827326cb7a89cea7e85f2a8873692f21c.tar.lz cloudflare-tor-3486043827326cb7a89cea7e85f2a8873692f21c.tar.xz cloudflare-tor-3486043827326cb7a89cea7e85f2a8873692f21c.zip |
example.json.is_cloudflare.php
-rw-r--r-- | tool/example.json.is_cloudflare.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); |