I have read through most of the adobe manuals for security and still have no Idea how to use those features, that's why there are so many variations of them in my code.
I can not figure out why my php file will not get the variables I am sending it. In the following code I simplified all of my php code for testing purposes and I still cant even echo the variables that are supposed to be sent.
I am using a virtual dedicated server on godaddy.com also I tried it on their free web hosting and their cheapest hosting plan. I have the crossdomain.xml file uploaded to pogolama.com/public_html/crossdomain.xml and have tried uploading it to pogolama.com/crossdomain.xml.
Im not sure what else to say except, someone please help. :)
Action Script 2.0
Expand|Select|Wrap|Line Numbers
- varsToSend = new LoadVars();
- varsToSend.player_name = player_name;
- varsToSend.player_score = running_time;
- varsToSend.send("http://www.pogolama.com/view.php", "POST");
- import flash.system.Security;
- import flash.system.* ;
- System.security.allowDomain("www.pogolama.com");
- System.security.allowDomain("pogolama.com");
- System.security.allowDomain("*");
- System.security.loadPolicyFile("pogolama.com/public_html/file.xml")
- System.security.loadPolicyFile("http://www.pogolama.com/public_html/file.xml");
[PHP]<?php
$player_name = $_GET[player_name]; /* I have one set to GET and on to POST just to test if that is the problem. */
$player_score = $_POST[player_score];
echo $player_name;
echo $player_score;
?>[/PHP]
Crossdomain.xml
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0"?>
- <cross-domain-policy>
- <allow-access-from domain="*" />
- <allow-access-from domain="www.kongregate.com" />
- <allow-access-from domain="*.kongregate.com" />
- <allow-access-from domain="www.kongregate.com/*" />
- <allow-access-from domain="www.pogolama.com" />
- <allow-access-from domain="*.pogolama.com" />
- <allow-access-from domain="www.pogolama.com/*" />
- </cross-domain-policy>