Parsing URL Components in PHP


Use parse_url() to break down a URL into its components.

Source Code

$url = 'http://username:password@hostname:9090/path?arg=value#anchor';
print_r(parse_url($url));
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments