RE: Getting domain out of a URL

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

 



[snip]
I receive posts from an open moderated forum that need to be filtered
for 
urls. I've successfully managed to trap any entires that use 'http://'
'www.' 
with the standard '.com' '.org', '.net' endings.

What I need to do is to strip the prefix part ('http:// or http://www.
or 
'www') and suffix as well (the .com, etc.) I need only the domain name.
I 
can't seem to trim away the suffix part.
[/snip]

Have you looked at http://us3.php.net/manual/en/function.parse-url.php

-- 
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