The URL extraction functions extract components from HTTP URLs (or any valid URIs conforming to RFC 2396). The following syntax is supported:
The extracted components do not contain URI syntax separators
such as :
or ?
.
Returns the fragment identifier from url
.
Returns the host from url
.
Returns the value of the first query string parameter named name
from url
. Parameter extraction is handled in the typical manner
as specified by RFC 1866.
Returns the path from url
.
Returns the port number from url
.
Returns the protocol from url
:
Returns the query string from url
.
Escapes value
by encoding it so that it can be safely included in
URL query parameter names and values:
.
, -
, *
and _
are not encoded.+
.%XX
where XX
is the uppercase hexadecimal
value of the UTF-8 byte.Unescapes the URL encoded value
.
This function is the inverse of url_encode().