Hello,
Does anyone know of a quick/easy/fast way to to get the domain out of a url?
For instance if I do : $url = $cgi->url();
I'll get, say http://joe.mama.com/so/isyour.cgi?mother
I know I can use URI module to get the scheme (http, https, ftp, etc) from that
What I need to grab out of that example is the domain only, ( mama.com ) just the part
that one would register with a registrar, not any subdomains or any of that just
whatever.com.
Any ideas?
Can it be done with cgi or uri or some other module instead of doing some regex on it
that will probably let stuff get through?
Thanks
Dan