Hi there
I am trying to get a xml into flash from an external domain using a PHP proxy to get around the cross domain issue.
I have created a simple swf file that is meant to load the xml and print out some data from the received file. Unfortunately I havent been able to get it to work as yet.
Here is the action script
var Sender = new LoadVars();
var GetData = new XML();
GetData.ignoreWhite = true;
thefirst =[];
GetData.onLoad = function(success) {
if (success){
list = this.firstChild;
thefirst[0] = list.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.test.text = GetData;
_root.test2.text = list;
_root.test3.text = thefirst[0];
}
};
Sender.sendAndLoad("proxy.php", GetData, "POST");
theBtn.onRelease = function() {
Sender.sendAndLoad("proxy.php", GetData, "POST");
};
and here is the PHP which is in the file proxy.php on in my root directory of my website.
<?php
$dataURL = "http://rss.bigfishgames.com/rss.php?username=firehawk777&type=2&locale=en&gametype=pc&content=glrank";
readfile($dataURL);
?>
Please can someone explain what I am doing wrong?