Get domain from uri

R

Ryan Chan

What are the criteria for whether you go 2- or 3-deep to
get what you consider to be the domain?

Think about Alexa, they map subdomains (with many level) into a single
domain and generate the ranking

e.g.

http://uk.finance.yahoo.com => yahoo.com


What I want to do is something like that.
 
B

Bart Lateur

What are the criteria for whether you go 2- or 3-deep to
get what you consider to be the domain?

As it stands, there doesn't seem to be a purely syntactic
solution, you'll need knowledge of how each TLD is
organized.

Oh, I would totally have missed the original question, if it wasn't for
this reply.

I found this:

Net::Domain::TLD
http://search.cpan.org/perldoc?Net::Domain::TLD

which is a module to reduce a domain name to its core domain name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top