[thelist] Re: PHP: getting domain names from a url - being foiled by .co.uk addresses

Dunstan Orchard dunstan at 1976design.com
Sun Dec 7 18:37:29 CST 2003


Dunstan Orchard wrote:
> [3] Tony and Ken suggested looking up the IP address and then using that 
> to look up the domain name.
> 
> news.yahoo.com (or indeed just 'yahoo.com')
> ip = 216.109.124.244
> hostname = story1.news.vip.dcn.yahoo.com
> 
> Does anyone know of a way to return the public-facing urls?

This site seeems to give back the right results:

http://www.kloth.net/services/nslookup.php

my.opera.com
news.yahoo.com

both show just the main bit in the results there at various points, ie:

opera.com
yahoo.com

I wonder how you do that in PHP?

-------------------------------------
Dorset, England
Work: http://www.1976design.com/
Play: http://www.1976design.com/blog/
Learn: http://webstandards.org/




More information about the thelist mailing list