actionscript 3 - php bloack as3 after trying load variables in setinterval loop -
php bloack as3 after trying load variables in setinterval loop. guess title explain all. have flash widget use urlloader grab php variables , works perfect urlloader in setinterval loop happens every 2 mins problem work several times after php blocks ip loading variables (using flash widget) , gives no response. tried search subject found nothing flash outdated using flash in place dont support except flash no js... idk problem got huge feeling server side issue , idk how fix it. thought share issue here maybe can help. btw blocks ip of user been using flash long not after 2-3 mins unblocks ip again , works again
btw when ip blocked php error return flash:
2101: string passed urlvariables.decode() must url-encoded query string containing name/value pairs.
and searching found means flash got nothing php request.
the as3 code simple that:
submit_btn.addeventlistener(mouseevent.click, btndown); function btndown(event:mouseevent):void { var variables:urlvariables = new urlvariables(); var varto:urlrequest = new urlrequest("http://url/dir/script.php"); varto.method = urlrequestmethod.post; varto.data = variables; var varloader:urlloader = new urlloader; varloader.dataformat = urlloaderdataformat.variables; varloader.addeventlistener(event.complete, completehandler); variables.somecode = "code"; varloader.load(varto); function completehandler(event:event):void{ var var1fromphp = event.target.data.var1ofphp; var var2fromphp = event.target.data.var2ofphp; from1_txt.text = var1fromphp; from2_txt.text = var2fromphp; trace("traced:" + event.target.data); } }
thanks , appreciate replies/support
found problem wasnt php/server side encoding decoding url variables cuz vars had "&" character interfer reponse.
Comments
Post a Comment