From 7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5 Mon Sep 17 00:00:00 2001 From: characters Date: Fri, 30 Aug 2019 02:26:51 +0200 Subject: Update 'tool/get_fqdn_tmg1.php' --- tool/get_fqdn_tmg1.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tool') diff --git a/tool/get_fqdn_tmg1.php b/tool/get_fqdn_tmg1.php index 04e65b57..ad897ff5 100644 --- a/tool/get_fqdn_tmg1.php +++ b/tool/get_fqdn_tmg1.php @@ -5,14 +5,15 @@ define('F_INPUT','noncloudflarelist.txt'); define('F_OUTPUT','fqdnlist.txt'); if (!file_exists(F_INPUT)){ - die('File not found'); + print 'File not found'; + exit; } $result = array(); foreach(explode("\n",file_get_contents(F_INPUT)) as $t){ $t = explode(' ',$t)[0]; - if (preg_match("/^([a-z0-9-\.]{1,255})\.([a-z]{2,40})$/",$t)){ + if (preg_match("/^([a-z0-9\.-]{1,255})\.([a-z]{2,40})$/",$t)){ $result[] = $t; } } @@ -20,4 +21,4 @@ foreach(explode("\n",file_get_contents(F_INPUT)) as $t){ $result = array_unique($result); file_put_contents(F_OUTPUT,implode("\n",$result)); -echo('Done'); +print 'Done'; -- cgit v1.2.3