mnscript
StringResult DNS.ResolveDomain(string)
Description ​
Resolves an IP from a domain name. See https://portal.civilnetworks.net/maxnet/domains for more information
Arguments ​
string
- The domain name to lookup.
Returns ​
StringResult
- A StringResult containing either the resolved IP, or a reason for failure
Example ​
msc
using Console;
using System;
using DNS;
// Looks up an IP from a domain name, then displays it.
// This uses the DNS cache so you will need to wait a few minutes after changing your domain records.
string domainName = "mn.mnscript.com";
StringResult result = DNS.ResolveDomain(domainName);
if (result.GetResult()) {
Console.WriteLine("Domain IP: "..result.GetString());
} else {
Console.WriteLine("Domain resolve failed: "..result.GetString());
}