# URL Encoding (Confused)

**URL:** <https://forum.kirupa.com/t/url-encoding-confused/11851>\
**Category:** flash\
**Created:** [January 23, 2003, 5:18am UTC](https://forum.kirupa.com/t/url-encoding-confused/11851 "2003-01-23T05:18:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [January 23, 2003, 5:18am UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/1 "2003-01-23T05:18:38Z")

</div>

I am sending a string to asp from flash that looks like this;  
&profileID=0jt3f1g10jt3f1g11wt6q1d00jt3f1g1  
&profileID=0jt3f1g10jt3f1g11wt6q1d010qxs1m0  
&profileID=0jt3f1g10jt3f1g11wt6q1d00fln71v1

The problem is when asp (probably php too) reads this string, it reads it like this

%26profileID%3D0jt3f1g10jt3f1g11wt6q1d00jt3f1g1 %26profileID%3D0jt3f1g10jt3f1g11wt6q1d010qxs1m0 %26profileID%3D0jt3f1g10jt3f1g11wt6q1d00fln71v1

Now this sucks, is there a way to encrypt my flash string so asp will read the string corectly?

I know asp is url encoding the flash string, but this bit of info does not seem to help.

Can YOU!!!:hangover:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 1:16pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/2 "2003-01-23T13:16:23Z")

</div>

Use unescape on that string.

pom :ninja:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:18pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/3 "2003-01-23T17:18:25Z")

</div>

I am curious about this issue as well.

If I am posting a similiar string to an .asp file, would I use the unescape command in flash before the data is posted? Or does the unescape command go somewhere in the .asp file?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 8:24pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/4 "2003-01-23T20:24:41Z")

</div>

I believe ilyaslamasse means to put unescape in the flash A.S. string I am passing to asp, but this does not seem to fix the problem.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 7:21pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/5 "2003-01-24T19:21:14Z")

</div>

I think Load vars will solve my problem but I am having trouble using the send function of loadvars. Help Help.

H88 did you post a response to this thread because I can’t find it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 7:25pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/6 "2003-01-24T19:25:17Z")

</div>

well let us see, how are you calling the send function, are you posting data to a php(or whatever), and or getting a response? or your trying to get a data from a php script normally without posting any vars.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 8:20pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/7 "2003-01-24T20:20:27Z")

</div>

I am trying to send to ASP Like this

profileID = new LoadVars();  
profileID += “&”+\_root.player.listbox.getSelectedItem().data[“ID”]  
profileID.send("…playlist.asp", “\_self”, “POST”);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 8:26pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/8 "2003-01-24T20:26:10Z")

</div>

profileID = new LoadVars();  
profileID.Variable = “&”+\_root.player.listbox.getSelectedItem().data[“ID”]  
profileID.send("…playlist.asp", “\_self”, “POST”);

Where “Variable” is the variable being posted to the asp script, i hope you get the idea.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 8:51pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/9 "2003-01-24T20:51:52Z")

</div>

I had to change “Variable” to profileID because that is the Variable being posted to the asp script.

It is sending to asp know but the string I send it is still turning the “&” into %26.

I thought load Vars would solve this problem?

Any Ideas.  
:q:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 8:55pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/10 "2003-01-24T20:55:27Z")

</div>

Well that’s weired, why do you actually need to post ‘&’?

Did you try?

profileID.Variable = unescape("&")+\_root.player.listbox.getSelectedItem().data[“ID”]

Well now that sound dump, because it’s actually already unescaped…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 9:04pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/11 "2003-01-24T21:04:21Z")

</div>

I need the “&” because the string sent by flash is multiple vaules seperated by “&”, so when asp reads the string it will look like this; &Value1&Value2&Value3 ect…

And yes, I tried the unescape command and no luck, the string is still being encoded.

There must be a way!!!

☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 9:07pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/12 "2003-01-24T21:07:33Z")

</div>

> \*Originally posted by waffe \*  
> **I need the “&” because the string sent by flash is multiple vaules seperated by “&”, so when asp reads the string it will look like this; &Value1&Value2&Value3 ect…**

I never worked with asp, but can’t you just say:

Document.print… “&”+ImportedVar1+“&”+ImportedVar2

Edit: you might want to Ask Rev if you want any asp help, he knows it i think.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 9:34pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/13 "2003-01-24T21:34:20Z")

</div>

I can’t do that because the number of values are dynamic, meaning they change for one user to the next.

I don’t really think it is an ASP problem. URL encoding happens when you pass data though the html headers, so regardless of what program I’m sending to the data is going to be encoded.

I am not working with the asp script, nor do I know much about it.  
I am the flash guy on a project working with an ASP guy.:hat:  
I have asked the ASP guy the same question of “why can’t you fix the string problem on your end”, and he says “he can’t” because of certain guide lines I don’t under stand.

Crazy, there are 3 programs myself, and now you that can’t find the answer to this question.

I’m fallen apart here!

:hair:

Thanks for the load Vars help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 9:42pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/14 "2003-01-24T21:42:11Z")

</div>

Hmm,

profileID = new LoadVars();  
profileID.Variable = unescape("%26")+\_root.player.listbox.getSelectedItem().data[“ID”]  
profileID.send("…playlist.asp", “\_self”, “POST”);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 9:51pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/15 "2003-01-24T21:51:14Z")

</div>

I tried all the variation, escape, unescape, “&”, “%26”.

Nada

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 11:02pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/16 "2003-01-24T23:02:09Z")

</div>

g’afternoon, let me first introduce myself. I’m abzoid, rev flash’s brother.

I’m not a Flash guy, but I am an ASP programmer. It should be relatively easy for the ASP programmer that your working with to use the replace command on an intermdiate ASP page to parse the parameter string. The coding would look something like this, assuming he’s using VBScript. You’d pass the existing string to this intermediate page where it would be parsed into the proper format then passed on to the intended page.

paramStr = Request.Form  
paramStr = Replace(paramStr,"%26","&")  
paramStr = Replace(paramStr,"%3D","=")

Response.Redirect ("…playlist.asp?" + paramStr)

abzoid :geek:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 24, 2003, 11:11pm UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/17 "2003-01-24T23:11:29Z")

</div>

Thanks abzoid,

I just sent him your respones. I’ll let ya know what he says.

😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 25, 2003, 2:30am UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/18 "2003-01-25T02:30:48Z")

</div>

> \*Originally posted by abzoid \*  
> **I’m abzoid, rev flash’s brother.**  
> Welcome man :trout:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 25, 2003, 2:46am UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/19 "2003-01-25T02:46:28Z")

</div>

Be afraid… be very afraid…

Abzoid is lurking…

:evil: :skull: :ninja:

:love:

Rev ![](http://www.aulman.com/rev.gif)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 25, 2003, 6:46am UTC](https://forum.kirupa.com/t/url-encoding-confused/11851/20 "2003-01-25T06:46:26Z")

</div>

Thank ilya 8]

Hey Bro, 'sup? :cool: 😛

[Next page](https://forum.kirupa.com/t/url-encoding-confused/11851.md?page=2)
