Url encode

From Kolmafia
Revision as of 08:31, 20 November 2014 by imported>Bale (categories)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

string url_encode(string source )

  • source is the original to encode

Returns the encoded version of the supplied source string with all non-alphanumeric characters replaced with the standard URI-encoded escape sequences. For example, spaces are replaced with "+" and other special characters are replaced by "%" followed by a two-digit (hexadecimal) character code.

See Also

to_url() | url_decode() | entity_encode() | entity_decode()

More Information

See the w3c page here for more info.

Special

String converted by this function can be returned to their original form with url_decode().