resolv useful for converting between hostnames and IP addresses : IP Address « Network « Ruby






resolv useful for converting between hostnames and IP addresses


require 'resolv'

puts Resolv.getaddress("http://www.google.com/")

 








Related examples in the same category

1.Get all the addresses associated with a hostname
2.turn IP addresses into hostnames using the getname method
3.To search for MX records you have to use the Resolv::DNS class