Community discussion forum

Get host name from IP address, and vice versa

This is a comment thread discussing Get host name from IP address, and vice versa
  • 10 years ago

    This thread is for discussions of Get host name from IP address, and vice versa.

  • 7 years ago

    Does this use DNS?  Or does it ask the host for it's name?  Is there the possiblity of NOT using DNS?

  • 5 years ago

    There is also a simple to use DNS Lookup component
    at http://www.lavantech.com/dns.net

  • 3 years ago

    Thanks for the code...but I got error 5...Orz please help..

    from here:

              IPToText = CStr(Asc(IPAddress)) & "." & _
                  CStr(Asc(Mid$(IPAddress, 2, 1))) & "." & _
                  CStr(Asc(Mid$(IPAddress, 3, 1))) & "." & _
                  CStr(Asc(Mid$(IPAddress, 4, 1)))


    in function iptotext

     

    it works out fine without the codes after the first line, is it because of mid function? Anyway, please just teach me how.... I'm a newbie to vb

  • 3 years ago
    Awesome code!  I have looked everywhere for something exactly like this and everything I found was either ridiculously complex or didn't work.  This worked brilliantly for me.  Thank you
  • 1 year ago

    Use ping -a 111.xx.xxx to get the hostname from an ip address. It's the reverse of nslookup which works on dns name to give ip address.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!