Could someone explain this por favor ?
Mike Bonner
bonnmike at gmail.com
Fri Aug 7 07:41:14 EDT 2015
If I understand correctly, the base64 encode will turn the data into
something like this:
TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg
dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu
dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo
ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=
At which point UrlEncode() would serve no purpose.
Having said that.. I'm not sure why urldecode is throwing an error. Even if
you pass it a straight unencoded text string, it should just.. do nothing
to it. (If there are no % signs, theres nothing to decode.. It might hork
something if there ARE % signs, but it shouldn't cause a crash)
Either way though, I think it should be Either/Or. Either url encode, OR
base64 encode.
On Fri, Aug 7, 2015 at 4:13 AM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:
> Hi JBV,
>
> The Apache server decodes the URL before passing it on to the LiveCode
> engine. The same happens with PHP.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Installer Maker for LiveCode:
> http://qery.us/468
>
> Buy my new book "Programming LiveCode for the Real Beginner"
> http://qery.us/3fi
>
> LiveCode on Facebook:
> https://www.facebook.com/groups/runrev/
>
>
> On 8/7/2015 11:52, jbv at souslelogo.com wrote:
>
>> Hi list
>>
>> On the client side I have this script :
>>
>> get myVar
>> get compress(it)
>> get base64encode(it)
>>
>> POST ("a=" & urlencode(it)) to URL
>> ("http://www.domain.com/irev/myScript.lc?")
>> put base64decode(it) into myVar
>> put decompress(myV) into myVar
>> answer myVar
>>
>> and on the server side I have :
>>
>> put $_POST["a"] into myVar
>> put URLDecode(myVar) into myVar
>> put base64decode(myVar) into myVar
>> put decompress(myVar) into myVar
>>
>>
>> and this returns a compilation error on the server side.
>> But if I remove the line "put URLDecode(myVar) into myVar", then it
>> works...
>>
>> What am I missing ?
>>
>> Thanks in advance
>> jbv
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list