|
$url = "http://www.site.com/blah/etc.com";
// remove the http://
$url = str_replace("http://","",$url);
// split at "/"
$exp = explode("/",$url);
// result is everything before first /
$end = $exp[0];
theres shorter ways but to show whats going on
__________________
hatisblack at yahoo.com
|