[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 =
> 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:



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


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