Announcement

Collapse
No announcement yet.

Best way to get IP from domain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best way to get IP from domain

    What is the best way to get the IP from a domain, I use dynamic IP address on a domain so at times it can change, so I need to resolve the domain address to a IP address. can it be done in Lua or a command line tool or do I have to use some online service?
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    I used nslookup
    Code:
    function GetIP(s_URL)
        local getip = io.popen("nslookup "..s_URL.." | find /i \"Address\"");
        local getipout = getip:read("*a");
        getip:close();
        getnum = String.Find(getipout, "Address", 2, true);
        getipout = String.Mid(getipout, getnum+9, -1);
        return getipout;
    end
    Plugins or Sources MokoX
    BunnyHop Here

    Comment

    Working...
    X