http://php.net/manual/en/function.parse-url.php - special focus on 'host' and 'path'.
Example:
$var = "http://minova.tumblr.com/post/145515";
print_r(parse_url($var));
Outputs:
array (
'scheme' => 'http',
'host' => 'minova.tumblr.com',
'path' => '/post/145515',
)
Example II:
$var = "http://minova.tumblr.com/post/145515";
print parse_url($var, PHP_URL_HOST);
Outputs:
minova.tumblr.com
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…