aboutsummaryrefslogtreecommitdiffstats
path: root/oldrep/tool/get_fqdn_tmg1.php
diff options
context:
space:
mode:
Diffstat (limited to 'oldrep/tool/get_fqdn_tmg1.php')
-rw-r--r--oldrep/tool/get_fqdn_tmg1.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/oldrep/tool/get_fqdn_tmg1.php b/oldrep/tool/get_fqdn_tmg1.php
new file mode 100644
index 00000000..ad897ff5
--- /dev/null
+++ b/oldrep/tool/get_fqdn_tmg1.php
@@ -0,0 +1,24 @@
+<?php
+//License: WTFPL
+
+define('F_INPUT','noncloudflarelist.txt');
+define('F_OUTPUT','fqdnlist.txt');
+
+if (!file_exists(F_INPUT)){
+ 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)){
+ $result[] = $t;
+ }
+}
+
+$result = array_unique($result);
+file_put_contents(F_OUTPUT,implode("\n",$result));
+
+print 'Done';