Thursday, 12 November 2015

URL ENCORDER DECODER CODE

URL ENCORDER DECODER


-----------------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE IN POST HTML SECTION

bit.ly shortened URL expander

http://www.xposition.co.uk/bitly-decoder.asp

URL encoding, also known as Percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances. Although it is known as URL encoding it is, in fact, used more generally within the main Uniform Resource Identifier (URI) set, which includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such it is also used in the preparation of data of the "application/x-www-form-urlencoded" media type, as is often used in the submission of HTML form data in HTTP requests.

Types of URI characters

The characters allowed in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding). Reserved characters are those characters that sometimes have special meaning. For example, forward slash characters are used to separate different parts of a URL (or more generally, a URI). Unreserved characters have no such meanings. Using percent-encoding, reserved characters are represented using special character sequences. The sets of reserved and unreserved characters and the circumstances under which certain reserved characters have special meaning have changed slightly with each revision of specifications that govern URIs and URI schemes.

RFC 3986 section 2.2 Reserved Characters (January 2005)
!*'();:@&=+$,/?#[]

RFC 3986 section 2.3 Unreserved Characters (January 2005)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789-_.~

Other characters in a URI must be percent encoded.

Percent-encoding reserved characters

When a character from the reserved set (a "reserved character") has special meaning (a "reserved purpose") in a certain context, and a URI scheme says that it is necessary to use that character for some other purpose, then the character must be percent-encoded. Percent-encoding a reserved character involves converting the character to its corresponding byte value in ASCII and then representing that value as a pair of hexadecimal digits. The digits, preceded by a percent sign ("%"), are then used in the URI in place of the reserved character. (For a non-ASCII character, it is typically converted to its byte sequence in UTF-8, and then each byte value is represented as above.)

The reserved character "/", for example, if used in the "path" component of a URI, has the special meaning of being a delimiter between path segments. If, according to a given URI scheme, "/" needs to be in a path segment, then the three characters "%2F" or "%2f" must be used in the segment instead of a raw "/".

Reserved characters after percent-encoding
!#$&'()*+,/:;=?@[]
%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D

Reserved characters that have no reserved purpose in a particular context may also be percent-encoded but are not semantically different from those that are not.

In the "query" component of a URI (the part after a ? character), for example, "/" is still considered a reserved character but it normally has no reserved purpose, unless a particular URI scheme says otherwise. The character does not need to be percent-encoded when it has no reserved purpose.

URIs that differ only by whether a reserved character is percent-encoded or appears literally are normally considered not equivalent (denoting the same resource) unless it can be determined that the reserved characters in question have no reserved purpose. This determination is dependent upon the rules established for reserved characters by individual URI schemes.

Percent-encoding unreserved characters

Characters from the unreserved set never need to be percent-encoded.

URIs that differ only by whether an unreserved character is percent-encoded or appears literally are equivalent by definition, but URI processors, in practice, may not always recognize this equivalence. For example, URI consumers shouldn't treat "%41" differently from "A" or "%7E" differently from "~", but some do. For maximum interoperability, URI producers are discouraged from percent-encoding unreserved characters.

Percent-encoding the percent character

Because the percent ("%") character serves as the indicator for percent-encoded octets, it must be percent-encoded as "%25" for that octet to be used as data within a URI.

Percent-encoding arbitrary data

Most URI schemes involve the representation of arbitrary data, such as an IP address or file system path, as components of a URI. URI scheme specifications should, but often don't, provide an explicit mapping between URI characters and all possible data values being represented by those characters.

Binary data

Since the publication of RFC 1738 in 1994 it has been specified[1] that schemes that provide for the representation of binary data in a URI must divide the data into 8-bit bytes and percent-encode each byte in the same manner as above. Byte value 0F (hexadecimal), for example, should be represented by "%0F", but byte value 41 (hexadecimal) can be represented by "A", or "%41". The use of unencoded characters for alphanumeric and other unreserved characters is typically preferred as it results in shorter URLs.

Character data

The procedure for percent-encoding binary data has often been extrapolated, sometimes inappropriately or without being fully specified, to apply to character-based data. In the World Wide Web's formative years, when dealing with data characters in the ASCII repertoire and using their corresponding bytes in ASCII as the basis for determining percent-encoded sequences, this practice was relatively harmless; it was just assumed that characters and bytes mapped one-to-one and were interchangeable. The need to represent characters outside the ASCII range, however, grew quickly and URI schemes and protocols often failed to provide standard rules for preparing character data for inclusion in a URI. Web applications consequently began using different multi-byte, stateful, and other non-ASCII-compatible encodings as the basis for percent-encoding, leading to ambiguities and difficulty interpreting URIs reliably.

For example, many URI schemes and protocols based on RFCs 1738 and 2396 presume that the data characters will be converted to bytes according to some unspecified character encoding before being represented in a URI by unreserved characters or percent-encoded bytes. If the scheme does not allow the URI to provide a hint as to what encoding was used, or if the encoding conflicts with the use of ASCII to percent-encode reserved and unreserved characters, then the URI cannot be reliably interpreted. Some schemes fail to account for encoding at all, and instead just suggest that data characters map directly to URI characters, which leaves it up to implementations to decide whether and how to percent-encode data characters that are in neither the reserved nor unreserved sets.

Common characters after percent-encoding (ASCII or UTF-8 based)
newlinespace"%-.<>\^_`{|}~
%0A or %0D or%0D%0A%20%22%25%2D%2E%3C%3E%5C%5E%5F%60%7B%7C%7D%7E

Arbitrary character data is sometimes percent-encoded and used in non-URI situations, such as for password obfuscation programs, or other system-specific translation protocols.

Source: Wikipedia
-----------------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE IN POST HTML SECTION
-----------------------------------------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>URL Decoder/Encoder</title>
<style type="text/css">
<!--
body {background: white; color: black;}
form {margin: 0;}
h1 {font-family: Arial, sans-serif; line-height: 0.85em; border-bottom: 2px solid;
margin-bottom: 0.33em; padding-bottom: 0;}
textarea {background:url(data:image/gif;base64,R0lGODlhsQBfALMAAO+9jPe9iP+9e/+9hOLBnOnBnMbGwdbGs63G3rXG1r3GzrnG2qXG563G56XG75zG9ywAAAAAsQBfAAAE/lDISau9OOvNZQBgKI5BZ55oqq7s+QHEcRi0gtyMo+98z9wIBc0gI4AGraRyyex8YjbE7kGtWq/YbFb3SygORmRzTC5bPjObQ8tuu9+PnzBsrttPsIMazu/7q3JgAHeEdzAGCAx/i4x+DgwJBgQlhZUsATEJio2cnX0MXwCUlqQYAXoNa56rrG8OCJKjpZaYBg2tuLlvsAWzhQAHUrrDxFsJB4O+Y6cKqsXP0FSgBGLKl8HR2doPCdTWKcAI2+PZx7LfGAAGm+Tt0AgH5+gS6uzu98/w8sqn9vj/xbrNI5AAoMFoDhQkmxXAgLODEIkxODCrQMGIGJ8ptHTAX8aP/rgQECDU8CHIk60cUKxjEaXLYRvJdHxJM5fIMQ5r6ky5UomBnUBZqfQZtKinoSx+Gl3ayMFIFQdMMp0Kp8HTE1GpavVjFavUrWC1NOjFAYDHsGixJNhXQUHat216YjgAt24WBmQvmLXL18paDG77Cn4gdwKBwYMZLJxwEXHfwgC+Ok6LQJbSyXydTgggDnNfA4Y9C25A6bJou08Dn7a7svPquqAFuH79VoEAzrTrIhAQOTdcBh8k+57qAITw4UsV90YeFsGAvczBJpAwO/rU2KatM316WPtUxfTOetc5fUL18TtjS8iOvqaDvLzFtz9puwL7+SffW4CO32V9C/f1/heRfnrJJyBA/11A14EZ4bVBgAy6g5QGATQW4T/qbVDALRfiowBbFxBwXIfFILBYBwuSuI1mKkCoYi4TQjXii510lURWNOpioxIEcJgjKwnAx6OPP3KSwIlLtFRkIwaAmAQAqi3JhwMZ1kHAeVJmEaQl6sz440ROmkFQlljE5Es/ZD5w0zwFRJkjlUh+MyaNCQk5jwQDENBMh3XeqaECBloHip1+poPIfLDEWSiFenqJmQPdhLmoBgXYMlwDBhA6qQqYAHraNJJumkItqQyGqRGikkSAAZq8BWksqc5ySCLEBYFMNbFac4gmjv7zSCTIhJqrrAVAkUAivUqEgBeSLRSg6LC55pEGDsnC8cgNkRCBKrTcqgBAsTIMcSwQ5JaL7RDaOtvtuuy2O0EEAAA7);}
textarea {
font-size:12px;
font-weight: bold;
width: 550px;
height:500px;
}


</style>

<script type="text/javascript">
function encode() {
var obj = document.getElementById('dencoder');
var unencoded = obj.value;
obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22");
}
function decode() {
var obj = document.getElementById('dencoder');
var encoded = obj.value;
obj.value = decodeURIComponent(encoded.replace(/\+/g, " "));
}

</script>
</head>
<body>

<form onsubmit="return false;">
<h1>URL Decoder/Encoder</h1>

<textarea cols="100" rows="20" id="dencoder">
http://fbgadgets.blogspot.co.uk/
</textarea>
<div>
<input type="button" onclick="decode()" value="Decode">
<input type="button" onclick="encode()" value="Encode">
</div>
<ul>
<li>Input a string of text and encode or decode it as you like.</li>
<li>Handy for turning encoded JavaScript URLs from complete gibberish into readable gibberish.</li>
<li>If you'd like to have the URL Decoder/Encoder for offline use, just view source and save to your hard drive.</li>
</ul>
</form>
</body>
</html>




0 comments:

Post a Comment

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets