FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » extracting the root domain from a URL
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: extracting the root domain from a URL [message #171696 is a reply to message #171667] Sun, 16 January 2011 09:29 Go to previous messageGo to previous message
Jonathan Stein is currently offline  Jonathan Stein
Messages: 43
Registered: September 2010
Karma:
Member
Den 15-01-2011 00:54, Thomas 'PointedEars' Lahn skrev:

> WHOIS would be overkill here and it is not universally supported anymore
> (for example, DENIC dropped WHOIS support a few years ago except via their
> website because of misuse), so you would get false positives.

We don't need the actual WHOIS data, and I believe that even DENIC
provides simple WHOIS status information.

> The proper internet service to use here is DNS itself, of course.

Depending on how Mike defines "root domain", I don't think you can do
this reliable from DNS.

If you look up www.example.com, and there is no A or AAAA record for
example.com, you'll get www.example.com as the "root domain".

Another approach would be to ask for NS records and define "root domain"
as the highest level with an NS record. This could however include
department.example.com, which might not be what Mike intended...

Regards

Jonathan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: printing for dot matrix printers
Next Topic: having better solution to promote your products.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 07:39:01 GMT 2024

Total time taken to generate the page: 0.31982 seconds