Pages: [1]
  Print  
Author Topic: get variables from PHP flash lite1.1  (Read 2260 times)
0 Members and 1 Guest are viewing this topic.
nanifrankey
Newbie
*
Posts: 25


« on: 28 May , 2009, 02:44:58 »

I works finally.
Because I use as2 before, not quite familer with as1, therefore I waste a lot of time to test. Tongue
Therefore I wrote the code which I tested here. I hope it can help someone like me, struggle with this tiny problem.
Flash :
loadVariables("http://127.0.0.1:1001/Basic/uldl?klCommand=loadVariables&klUrl=http://..test.php","GET");

trace(yes);
Server side
<?php
$error = "I come from PHP";
echo "&yes=$error";
if ($_POST["sendToPHP"] == "hello"){

echo = "&yes=$error";}
?>

But I still have problem with POST method,
because server side didn't get any data from Flash.
loadVariables("http://127.0.0.1:1001/Basic/uldl?klCommand=loadVariables&klUrl=http://...test.php?%26sendToPHP=hello&klUrlDecodeOff=1","/main","POST");
klError =0, but why php didn't get it??
Who can help me about it?


Logged
jeremija
Newbie
*
Posts: 17


« Reply #1 on: 09 July , 2009, 04:01:55 »

Hello,
I think that yours problem is url encoding in:
loadVariables("http://127.0.0.1:1001/Basic/uldl?klCommand=loadVariables&klUrl=http://...test.php?%26sendToPHP=hello&klUrlDecodeOff=1","/main","POST");

try:
loadVariables("http://127.0.0.1:1001/Basic/uldl?klCommand=loadVariables&klUrl=http://...test.php?sendToPHP=hello&klUrlDecodeOff=1","/main","POST");

Best,
jeremija
Logged
Pages: [1]
  Print  
 
Jump to: