php bloack as3 after trying load variables in setinterval loop. i guess the title explain it all. actually i have flash widget that use URLLoader to grab some php variables and it works perfect but this urlloader is in setinterval loop that happens every 2 mins the problem is it work for several times well then after that php blocks the ip that loading the variables (using flash widget) and gives no response. i tried to search about this subject but found nothing especially that flash is outdated but i am using this flash in place which dont support except flash no js... idk what is the problem exactly but i got huge feeling its a server side issue and idk how to fix it. thought to share my issue here maybe someone can help. btw it blocks the ip of the user that been using the flash for long not for all but after 2-3 mins it unblocks the ip again and works again
btw when my ip is blocked by php i get this error as return by flash:
2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
and by searching up found that this means the flash got nothing back from php request.
the as3 code is as simple as 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 and appreciate all the replies/support