Consumers Guide to Making Money Online.orgTop-rated free and inexpensive tools, tips and tutorials to help you design, build and maintain your website!
|
Free Tools: URL EncoderReturns a string in which all non-alphanumeric
characters replaced with a percent sign followed by two hex digits and spaces
encoded as plus signs. This tool is useful when you want to create links which
contain special characters.
URL to encode: $URL = $_POST['URL']; $encoded = urlencode($URL); $doubleenc = urlencode($encoded); $rawencoded = rawurlencode ( $URL); ?>Encoded: echo $encoded; ?> Double encoded: echo $edoubleenc; ?> Raw encoded: echo $rawencoded; ?> What does this mean / how is this useful?URL EncodingReturns a string in which all non-alphanumeric characters except the dash (-), the underscore (_) and the comma (,) have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. 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-www-form-urlencoded media type. If you are passing data in a url (in the query portion, that is everything after the question mark), if you don't URL-encode it, any non-alphanumeric characters other than the dash (-), the underscore (_) and the comma (,) will not be read correctly by the browser. Double encodingIf you want to pass a url with parameters as a value
IN a url AND through a javascript function, such as... Raw EncodingAll non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits. This is the encoding described in RFC 1738 for protecting literal characters from being interpreted as special URL delimiters, and for protecting URL's from being mangled by transmission media with character conversions (like some email systems). This differs from urlencoding (above) in that spaces are encoded as %20 rather than a plus sign (+). This is useful if you need to encode apostrophes; in this case you should be using rawurlencode as opposed to just urlencode.
URL Encoding Tool © Dev Mechanic |
Send us an email to: Copyright Benivia, LLC, 2005 |