[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: TCPSocket.gethostbyname difficulties

Nathaniel Talbott

9/26/2003 2:03:00 PM

ts [mailto:decoux@moulon.inra.fr] wrote:

> N> ntalbott@proxytest:~$ host cancer.org
> N> cancer.org has address 209.135.47.118
> N> cancer.org has address 0.0.0.0
>
> Why do you want to work with something which is broken ?
>
> svg% host 209.135.47.118
> Host 118.47.135.209.in-addr.arpa not found: 3(NXDOMAIN)
> svg%

Because my customers want to access broken sites, and they don't care that
they're broken. They'll tell me, "It loads in my browser... why can't your
system find it?" If I can't get this to work, I'll just have to stop
checking DNS, which would be unfortunate.

Thanks, Guy.


Nathaniel

<:((><


2 Answers

Peter Triller

9/26/2003 2:20:00 PM

0

On Friday 26 September 2003 16:02, Nathaniel Talbott wrote:
> ts [mailto:decoux@moulon.inra.fr] wrote:
> > N> ntalbott@proxytest:~$ host cancer.org
> > N> cancer.org has address 209.135.47.118
> > N> cancer.org has address 0.0.0.0
> >
> > Why do you want to work with something which is broken ?
> >
> > svg% host 209.135.47.118
> > Host 118.47.135.209.in-addr.arpa not found: 3(NXDOMAIN)
> > svg%
>
> Because my customers want to access broken sites, and they don''t care that
> they''re broken. They''ll tell me, "It loads in my browser... why can''t your
> system find it?" If I can''t get this to work, I''ll just have to stop
> checking DNS, which would be unfortunate.
>
> Thanks, Guy.
>
>
> Nathaniel
>

Well, this domains just dont have a reverse DNS entry. Thats not a ruby
problem, but a DNS problem.

and this is not really broken. it is not mandatory for an IP address to have a
mapping to a domain naime IIRC.

and even if it exists it could be totally different from the original domain,
as you can map lots of domains to an IP address.



ts

9/26/2003 2:33:00 PM

0

>>>>> "N" == Nathaniel Talbott <nathaniel@NOSPAMtalbott.ws> writes:

N> Because my customers want to access broken sites, and they don''t care that
N> they''re broken. They''ll tell me, "It loads in my browser... why can''t your
N> system find it?" If I can''t get this to work, I''ll just have to stop
N> checking DNS, which would be unfortunate.

You are right, you can''t use DNS. You can try

svg% ruby -rsocket -e ''p Socket::getnameinfo(["AF_INET",80,"noblepack.com"])''
["205.178.141.161", "http"]
svg%



Guy Decoux