url_encode
Encode URL strings using CURL.
Syntax
encoded = url_encode(Strings)
Arguments
- Strings
- Any single string or regular array of strings that needed to be encoded before using http_ functions.
- encoded
- Array of strings. Its sizes match
Strings
ones.
Description
url_encode(Strings) uses the CURL parser to performs URL conversion for each element of Strings
.
Examples
url_encode(["€T%Â" ; "µДزあ字"]) url_encode(["+-._~ ", "0123456789" ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"])
--> url_encode(["€T%Â" ; "µДزあ字"]) ans = "%E2%82%ACT%25%C3%82" "%C2%B5%D0%94%D8%B2%E3%81%82%E5%AD%97" --> url_encode(["+-._~ " "0123456789" ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"]) ans = "%2B-._~%20" "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"
See also
- url_decode — Decode encoded URL strings using CURL.
- http_get — HTTP GET request.
- url_split — Split an URL (HTTP, HTTPS, FTP...)
- ascii — string ASCII conversions
- dec2hex — convert from decimal to hexadecimal
History
Version | Description |
2024.0.0 | url_encode() added to the webtools module. |
Report an issue | ||
<< url_decode | Web Tools | url_split >> |