Forum Moderators: coopster

Message Too Old, No Replies

Isolate domain from url string

Is their a function to do this?

         

rover

6:55 pm on Feb 4, 2005 (gmt 0)

10+ Year Member



Does anyone know if there is an existing function or easy way to take a url string like:

[example.com...]

and return just the main part of the domain:

example.com

I've been searching around, but can't seem to find anything. Any ideas or hints in the right direction would be much appreciated...

jatar_k

8:18 pm on Feb 4, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what about using parse_url [ca3.php.net]

rover

9:06 pm on Feb 4, 2005 (gmt 0)

10+ Year Member



Thanks!