From bfd408937edea195340e8d5bfe77946929941fa7 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 11 Jan 2024 08:27:27 +0000 Subject: [PATCH] Update includes/main.php --- includes/main.php | 259 +++++++++++++++++++++++----------------------- 1 file changed, 130 insertions(+), 129 deletions(-) diff --git a/includes/main.php b/includes/main.php index 905978b..31a6880 100644 --- a/includes/main.php +++ b/includes/main.php @@ -1,130 +1,131 @@ - 'Quebec, Canada', // Replace with actual locations - 'ns2' => 'Frankfurt, Germany', - // Add more as needed - ]; - - if (file_exists($masterFile)) { - $content = file_get_contents($masterFile); - // Regex to match A records (IPv4) - preg_match_all('/(\S+)\s+IN\s+A\s+(\S+)/', $content, $aMatches); - // Regex to match AAAA records (IPv6) - preg_match_all('/(\S+)\s+IN\s+AAAA\s+(\S+)/', $content, $aaaaMatches); - - $ipv4Records = array_combine($aMatches[1], $aMatches[2]); - $ipv6Records = array_combine($aaaaMatches[1], $aaaaMatches[2]); - - foreach ($nsFilter as $nsName) { - $ipv4 = isset($ipv4Records[$nsName]) ? $ipv4Records[$nsName] : 'IPv4 not found'; - $ipv6 = isset($ipv6Records[$nsName]) ? $ipv6Records[$nsName] : 'IPv6 not found'; - $geographicalArea = isset($nsGeographicalAreas[$nsName]) ? $nsGeographicalAreas[$nsName] : 'Unknown Location'; - - $servers[] = [ - 'hostname' => $nsName, - 'ipv4' => $ipv4, - 'ipv6' => $ipv6, - 'location' => $geographicalArea - ]; - } - } - - return $servers; -} - -$dnsServers = getDnsServersInfo(); - -// Function to check server status -function checkServerStatus($server) { - // Ping command varies depending on the operating system - // This is an example for a Unix-like system - $output = []; - $status = null; - exec("ping -c 1 " . escapeshellarg($server), $output, $status); - - return $status === 0 ? "Online" : "Offline"; -} - -?> - - - - - - |--===TildeNIC ===--| Bringing .tilde to the Tildeverse! - - - -
- -
- -
-

Welcome to TildeNIC

-
-

TildeNIC is where you can request your .tilde top level domain. To do so, you need to first change your DNS over to one of the resolvers we offer, or you can self-host one.

- -

NOTE! None of the servers currently listed are functional. They are old IP addresses. New servers will be online very soon!

-

- OpenNIC Information -

-

- Domains offered by OpenNIC are also able to be resolved using our servers, Such as: -

    -
  • .geek
  • -
  • .bbs
  • -
  • .gopher and more.
  • -
- Will all resolve using our dns servers. For more information about OpenNIC you can visit http://opennic.org -

-
- -
-

TildeNIC Available DNS Servers

-
    - -
  • - - - IPv4: , - IPv6: , - Location: - - - - -
  • - -
-
-
- + 'Quebec, Canada', // Replace with actual locations + 'ns2' => 'Frankfurt, Germany', + 'ns3' => 'Sydney, Australia', + // Add more as needed + ]; + + if (file_exists($masterFile)) { + $content = file_get_contents($masterFile); + // Regex to match A records (IPv4) + preg_match_all('/(\S+)\s+IN\s+A\s+(\S+)/', $content, $aMatches); + // Regex to match AAAA records (IPv6) + preg_match_all('/(\S+)\s+IN\s+AAAA\s+(\S+)/', $content, $aaaaMatches); + + $ipv4Records = array_combine($aMatches[1], $aMatches[2]); + $ipv6Records = array_combine($aaaaMatches[1], $aaaaMatches[2]); + + foreach ($nsFilter as $nsName) { + $ipv4 = isset($ipv4Records[$nsName]) ? $ipv4Records[$nsName] : 'IPv4 not found'; + $ipv6 = isset($ipv6Records[$nsName]) ? $ipv6Records[$nsName] : 'IPv6 not found'; + $geographicalArea = isset($nsGeographicalAreas[$nsName]) ? $nsGeographicalAreas[$nsName] : 'Unknown Location'; + + $servers[] = [ + 'hostname' => $nsName, + 'ipv4' => $ipv4, + 'ipv6' => $ipv6, + 'location' => $geographicalArea + ]; + } + } + + return $servers; +} + +$dnsServers = getDnsServersInfo(); + +// Function to check server status +function checkServerStatus($server) { + // Ping command varies depending on the operating system + // This is an example for a Unix-like system + $output = []; + $status = null; + exec("ping -c 1 " . escapeshellarg($server), $output, $status); + + return $status === 0 ? "Online" : "Offline"; +} + +?> + + + + + + |--===TildeNIC ===--| Bringing .tilde to the Tildeverse! + + + +
+ +
+ +
+

Welcome to TildeNIC

+
+

TildeNIC is where you can request your .tilde top level domain. To do so, you need to first change your DNS over to one of the resolvers we offer, or you can self-host one.

+ +

NOTE! None of the servers currently listed are functional. They are old IP addresses. New servers will be online very soon!

+

+ OpenNIC Information +

+

+ Domains offered by OpenNIC are also able to be resolved using our servers, Such as: +

    +
  • .geek
  • +
  • .bbs
  • +
  • .gopher and more.
  • +
+ Will all resolve using our dns servers. For more information about OpenNIC you can visit http://opennic.org +

+
+ +
+

TildeNIC Available DNS Servers

+
    + +
  • + - + IPv4: , + IPv6: , + Location: - + + + +
  • + +
+
+
+ \ No newline at end of file