Php rawurlencode and rawurldecode tutorial

Source: Internet
Author: User
Tags rfc alphanumeric characters

Rawurldecode
(PHP 4 and PHP 5)

Rawurldecode-decodes a URL encoded string

Description
String rawurldecode (string $ str)
Returns a string in which two hexadecimal numbers are replaced with facial characters after the signs of the percent sign (%.

Parameters

Str
Decode the URL.


Return value
Returns the decoded URL as a string.

Instance

Example #1 rawurldecode ()

Rawurlencode
(PHP 4 and PHP 5)

Rawurlencode-URL encoding according to RFC 1738

Description
String rawurlencode (string $ str)
Encode a specific string according to RFC 1738 of & raquo.

Parameters

Str
Encode the URL.


Return value
Returns all non-alphanumeric characters in a string -_. It is replaced with a percent sign (%) followed by two hexadecimal numbers. This is the encoding description & raquo; RFC 1738 to protect the conversion and nature of the transport media that literal characters are interpreted as special URLs separated and protected URLs damaged (such as some email systems ).

Instance

For example, #1 includes an FTP website with a password

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.