Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How to use getname() ?

Reply
Thread Tools

How to use getname() ?

 
 
kazaam
Guest
Posts: n/a
 
      09-28-2007
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 then:

hostname = getname(IP)

but this doesn't work. I also can't get wiser by reading the doc about it: http://www.ruby-doc.org/stdlib/libdo...es/Resolv.html .

Someone knows how to use getname() ?


greets
 
Reply With Quote
 
 
 
 
kazaam
Guest
Posts: n/a
 
      09-28-2007
thx

On Fri, 28 Sep 2007 15:34:30 -0000
Warren Block <> wrote:

> require 'resolv'
> hostname = Resolv.getname('127.0.0.1')


--
kazaam <>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Could not use ''; file already in use. M K ASP .Net 11 04-09-2008 11:35 AM
where to use CPLD & where to use FPGA? kulkarku@math.net VHDL 6 03-06-2006 07:27 AM
Can I use XPath or something to a remote Mac or Linux box and just query an xml file, not using web services and use encyrption? jake ASP .Net 0 07-06-2004 02:16 PM
Cannot use the profile "default" because it is in use, not. please.post@yur.re.ply Firefox 1 07-04-2004 03:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57