[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using resolv.rb

barjunk

6/28/2007 10:21:00 PM

Can someone point me to some documentation that shows me with examples
how to use that ruby library?

I was just trying to point the resolver at a specific DNS server, but
had trouble figuring out how to do it.

I found the Resolv documentation, but non of the examples showed how
to change what dns server the resolver library used to resolve the
names.

Thanks for any pointers.

Mike B.

1 Answer

Vinay Beckham

8/29/2007 11:25:00 AM

0

Adam Bozanich wrote:
> On 6/28/07, barjunk <barjunk@attglobal.net> wrote:
>
> Example ( verified ):
>
> require 'resolv'
> Resolv::DNS.open({:nameserver=>["206.13.28.12"]}) do |r|
> puts r.getaddress("www.google.com")
> end
>
> -Adam

Hi Adam...
:nameserver=>["206.13.28.12"]
here the nameserver can have any LIVE IP right?? i mean i tried changing
this IP and used one of my own server IPs.. and it worked the same...
please correct me if I am going wrong ....
--
Posted via http://www.ruby-....