Menu Riverview Church

RAWURLENCODE

URL-encode according to RFC 3986

SYNTAX

rawurlencode ( string $str ) : string

PARAMETERS

str

The URL to be encoded.

RETURN

Returns a string in which all non-alphanumeric characters except -_.~ have been replaced with a percent (%) sign followed by two hex digits. This is the encoding described in RFC 3986 for protecting literal characters from being interpreted as special URL delimiters, and for protecting URLs from being mangled by transmission media with character conversions (like some email systems).

EXAMPLES

1

-_.~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

2

%20%21%40%23%24%25%5E%26%2A%28%29%2B%3D%7B%5B%7D%5D%7C%5C%3A%3B%22%27%3C%2C%3E%3F%2F

3

<a href="https://domain.com/path?var=encode%20non-alphanumeric">encode non-alphanumeric</a>

INTERNAL

rawurldecode

urldecode

urlencode

EXTERNAL

PHP