Re: Another parse problem
| From: | tedd | Date: | Wed, 16 Jun 2010 17:22:39 +0000 |
| Subject: | Re: Another parse problem | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306206@lists.php.net to get a copy of this message | ||
Rob and Daniel:
As expected, both of your submission were excellent. If this was an assignment in one of my classes ("as if" I could teach either of you anything) you would both receive an A+.
Daniel's routine also returned .ie TLD, but that was not stated as a requirement.
Daniel's routine also allow for full-link parsing, but again that was not stated as a requirement.
How to deal with duplicate domains was not addressed in the given and both routines differed on that point.
The given was to parse domain-names, but both routines pulled out sub-domains as well. Perhaps I am wrong in my understanding of what a domain name is, but I would normally look at sub domains as not part of the "domain name". Sub domains are simply extensions of the domain name, am I right or wrong?
In any event, I will be examining both your code because neither is the way I solved the problem. Mine was a bit more verbose and clumsy in comparison. It's always nice to see how the top dog's do it.
Cheers,
tedd
PS: I've been away for the last couple of days.
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com