php lepaskan jalur dari url string

function stripUrlPath($url){
    $urlParts = parse_url($url);
    $newUrl = $urlParts['scheme'] . "://" . $urlParts['host'] . "/";
    return $newUrl;
}
Borma