How to use getname()?

I seem to stupid but how can I use getname?!? My aim is getting the
domain or subdomain behind an IP-address. I required socket and tried

hostname = getname(IP)

but this doesn’t work. I also can’t get wiser by reading the doc about
it: .

Someone knows how to use getname() ?


kazaam [email protected] wrote:

Someone knows how to use getname() ?

Looking at resolv.rb will show you an example. I don’t know why that’s
not on the Resolv page.

require ‘resolv’
hostname = Resolv.getname(‘’)

thx :slight_smile:

On Fri, 28 Sep 2007 15:34:30 -0000