HomepageDirectoryGuideBlog

Credit Guides And Credit Services

Search

Create the future you want! Learn to make money online. Visit our website and start today!  www.exclusivebizopps.com

Encoding and Decoding URL strings

Credit Pacific Service Union by Manohar Kamath
August 31, 1999

Text Add Code "Barcode" (query)string bigmweb (9 votes) looking (query) looking string (as defined, it looks like a barcode) and a function to decode the string back into the original string. The 3 characters used for the encoding can be changed easily.

Credit First Service Union When you pass something as an URL's querystring, the string is encoded and all special characters like space, %, etc. are converted into their %xx values. Here, xx denotes a number and the %xx represents any character that can not be passed within the URL in their original form. The characters include spaces, all punctuation symbols, accented characters (like ? ? etc.) and non-ASCII characters(Source: MSDN library).

Decode encoded file !!! [ 7390 7371 ] Sun, 33 Go to previous message Go to next message Anonymous Coward You simply cannot decode encoded PHP file, that was encoded with the latest Zend Guard, using "strong obfuscation" option. Well, technically, you might be able to do so, but you'll end up with something best described as gibberish code, maintainable.

Card Credit Mobile Service The URL has to be in one piece and symbols spaces can break it. Also, symbols like &, = and + are used within an URL to separate the querystring's key. So, if you want to pass a key-value pair something like Message=Hello World, the URL (when not encoded) may look like:

Impartial guide about credit card types available in the UK. Ensure you choose the right credit card type for you and save money with uSwitch.com

Card Credit Discover Service Listing 1
mypage.asp?mesage=Hello World!

You simply cannot decode encoded PHP file are you sure //www.zendecode.com i know, that sucks, no more copyrighted source, i think to buy one license to zend guard, but when i see that.... hum.... nop, i will see other ways. zend company make something about this or say anything well, i like to know. regards. Decode encoded file !!! [ 7711 7586 ] Sun, 00 Go to previous message Go to next message

Credit Public Service Union and the space between "Hello" and "World" breaks the URL. So when you do something like

Decode encoded file !!! [ 6294] Sat, 59 10 July 2006 Junior Member Is there any way to decode the php files which were encoded by Zend encoder I want to sell an application without source and want to be sure that they can not gain the source. Confused

Card Credit Processing Service Listing 2
<%=Request.QueryString("message") %>

Center Credit Service Union within mypage.asp, you will get only "Hello"

Card Credit Service Wireless The escape() function in JavaScript parses a string and converts and special characters into their %xx equivalents. This function is very useful when you are trying to "build" a URL from within your ASP page. So if you want to build a correct version of the URL shown in listing 1, you would do something like in listing 3 (which is in JavaScript):

Credit Security Service Union Listing 3
lsURL = "mypage.asp?message=" + escape("Hello World!")

Credit Report Service Alternatively, you can use the URLEncode function in the Server object to get the same results. Listing 4 is in VBScript.

Blogspot Com Christian Listing 4
lsURL = "mypage.asp?message=" & Server.URLEncode("Hello World!")

Christian Counseling Credit The result is mypage.asp?message=Hello%20World%21

Credit Federal Service Union Decoding the querystring is easy - just call unescape() function in JavaScript. VBScript, on the other hand, does not have any in-built function to decode URLStrings.

Credit Monitoring Service Note: You will need to call unescape() within the same page as you called escape() to decode the strings. Otherwise, a simple Request.QueryString("message") will automatically decode the URL for you.

Credit Division Service I wrote this tiny function so you can include it on any ASP page with any scripting language and use it. Just include it in any ASP page and call the function URLEncode() with a string argument.

Card Credit Online Service Listing 5
<script language=JavaScript RUNAT=SERVER>
// This function decodes the any string
// that's been encoded using URL encoding technique
function URLDecode(psEncodeString)
{
  return unescape(psEncodeString);
}
</script>

Consumer Counseling Credit Inc An example of using this is in Listing 6

Card Credit Fleet Service Listing 6
<%=URLDecode("Hello%20World%21") %>

Card Consolidation Credit the result being - Hello World!

Credit Free Online Report Note:
Some people have asked me how to decode those "+"s, which are nothing but encoded spaces in the URL. Although Request.QueryString("your_key") should remove the +s, here is the code that will replace +s with spaces. This is nothing but a modified Listing 5.

Credit Federal First Service Listing 6
<script language=JavaScript RUNAT=SERVER>
// This function decodes the any string
// that's been encoded using URL encoding technique
function URLDecode(psEncodeString)
{
  // Create a regular expression to search all +s in the string
  var lsRegExp = /\+/g;
  // Return the decoded string
  return unescape(String(psEncodeString).replace(lsRegExp, " "));
}
</script>

[ Comment, Edit or Article Submission ]

Share this:

Add To Ask Add To Windows Live Add To Slashdot Stumble This Digg This Add To Del.icio.us Add To Reddit Add To Yahoo MyWeb Add To Google Bookmarks Add To Furl Fav This With Technorati Add To Newsvine Add To Bloglines

More about:

Dec January 2009 Feb
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Credit Guides And Credit Services Blog on Technorati Related Blog of Credit Guides And Credit Services on Sphere