Glossary Term
parse_url()
parse_url() — Parse a URL and return its components.
parse_url() — This function parses a URL and returns an associative array containing any of the various components of the URL that are present. The values of the array elements are not URL decoded.
This function is not meant to validate the given URL, it only breaks it up into the parts listed below. Partial and invalid URLs are also accepted, parse_url tries its best to parse them correctly.
Inputs: url: The URL to parse. component: Specify one of PHP_URL_SCHEME, PHP_URL_HOST, PHP_URL_PORT, PHP_URL_USER, PHP_URL_PASS, PHP_URL_PATH, PHP_URL_QUERY or PHP_URL_FRAGMENT to retrieve just a specific URL component as a string (except when PHP_URL_PORT is given, in which case the return value will be an int).
Returns: On seriously malformed URLs, parse_url may return false. If the component parameter is omitted, an associative array is returned. At least one element will be present within the array. Potential keys within this array are: scheme – e.g. http host port user pass path query – after the question mark ? fragment – after the hashmark #
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
