Get Original Querystring Values After Decryption

S

spradl

Anyone have a VB function or know how to retrieve original querystring
values after they have been decryted and lie within a string?

For example:
Say I have the querystring "id=99&page=5&value=&info=true" which has
been encrypted, sent as one querystring
"encryptedstring=blahblahblah", and then decrypted back into the
original string "id=99&page=5&value=&info=true". How do I get those
querystring values associated back with the string name like..
<%
id="99"
page="5"
value=""
info="true"
%>

I came up with this function, but of course a variable can't have a
name that is assigned like this..
<%
input = "query=1&this=ds2&again=&another=333"

Function GetQueryValues(strQuery)
aryQuery = split(strQuery, "&") 'Split into Name=Value
For i = 0 to UBound(aryQuery)
subAryQuery = split(aryQuery(i), "=") 'Split name and value into two
variables
subAryQuery(0) = subAryQuery(1)
Next
End Function

GetQueryValues(input)
%>

Suggestions???
 
K

Ken Schaefer

You could use the Script.Dictionary component

That would give you "keys" named Id, page, etc, and values 99, 5 etc

Cheers
Ken

: Anyone have a VB function or know how to retrieve original querystring
: values after they have been decryted and lie within a string?
:
: For example:
: Say I have the querystring "id=99&page=5&value=&info=true" which has
: been encrypted, sent as one querystring
: "encryptedstring=blahblahblah", and then decrypted back into the
: original string "id=99&page=5&value=&info=true". How do I get those
: querystring values associated back with the string name like..
: <%
: id="99"
: page="5"
: value=""
: info="true"
: %>
:
: I came up with this function, but of course a variable can't have a
: name that is assigned like this..
: <%
: input = "query=1&this=ds2&again=&another=333"
:
: Function GetQueryValues(strQuery)
: aryQuery = split(strQuery, "&") 'Split into Name=Value
: For i = 0 to UBound(aryQuery)
: subAryQuery = split(aryQuery(i), "=") 'Split name and value into two
: variables
: subAryQuery(0) = subAryQuery(1)
: Next
: End Function
:
: GetQueryValues(input)
: %>
:
: Suggestions???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,265
Messages
2,571,071
Members
48,771
Latest member
ElysaD

Latest Threads

Top