I would like to get the host name of any url for example if i've the following url
$url = "http://www.google.com";
then i want to get only google
what is after dot .
and before extension dot .
so that it can be applied for all types of urls.
so the results should be google
! i think this might needs regex or somehow
any idea how to do it , Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…