Re: get domain component from email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin Waterson wrote:
Hi all.

Im looking for a way to get the domain from an email address.
Not sub domains, just the domain, so luser@xxxxxxxxxxxxxxxxxxxxxx would return example.com.mn

similarly, the address luser@xxxxxxxxxxx would return
example.com

perhaps an array of tld's, then strip the tld off the end and anything
before that and the next "." is the domain?

also, somebody told me .co.uk was a tld, but I cannot see it listed
http://www.iana.org/root-whois/index.html

Kind regards
Kevin


Give this a try

http://www.cmsws.com/examples/php/domain_verification/example.php

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux