You may also want to see the discussion at. It is encoded the same way that the posted data from a WWW form is encoded, that is the same way as in application/x-This corresponds to the definition for application/x-www-form-urlencoded in RFC 1866. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. Returns a string in which all non-alphanumeric characters except -_. Urlencode encodes spaces as plus signs (not as %20 as done in rawurlencode)(see ) As of PHP 5.3, however, rawurlencode follows RFC 3986 which does not require encoding tilde characters. rawurlencode prior to php 5.3 encoded the tilde character ( ~) according to RFC 1738. 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). Returns a string in which all non-alphanumeric characters except -_.~ have been replaced with a percent (%) sign followed by two hex digits. Rawurlencode follows RFC 1738 prior to PHP 5.3.0 and RFC 3986 afterwards (see ) The one exception is legacy systems which expect the query string to follow form-encoding style of spaces encoded as + instead of %20 (in which case you need urlencode). If interoperability with other systems is important then it seems rawurlencode is the way to go. Gary Willoughby Gary Willoughby 11 Answers
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |