built in - Is there a PHP function for retrieving the "first part" of a URL? -


is there php function retrieving "first part" of url, similar how dirname/basename act on file paths?

something along lines of

echo "url_basename('example.com/this_post/12312')" 

which return

example.com 

parse_url should reliably.


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -