08-16-2008, 01:32 PM
|
#4 (permalink)
|
|
The Addict
Join Date: Sep 2007
Location: Denmark
Posts: 247
Thanks: 6
|
You could use the parse_url() function built into PHP to fetch the domain name =)
PHP Code:
<?php
$url = 'http://www.talkphp.com/';
var_dump(parse_url($url));
?>
Note, on invalid url's parse_url() will return false and throw an E_WARNING, so calling it with the error control operator prefixed (@).
__________________
|
|
|