example.json.is_cloudflare.php

This commit is contained in:
Christian Paulus 2021-04-02 07:42:16 +02:00
parent 87adff59c1
commit 3486043827
1 changed files with 1 additions and 1 deletions

View File

@ -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);