Please help
I am trying to make a rss reader in flash using a php proxy to get the xml file from the external domain.
The problem I have is I wish to send a variable url called ‘url’ thats used by the php to get the xml file.
This is the Action Script I am using:
var Sender = new LoadVars();
var GetData = new XML();
GetData.ignoreWhite = true;
GetData.onLoad = function(success) {
if (success){
list = this.firstChild;
len = list.childNodes.length;
list.childNodes[0].childNodes[0].firstChild.nodeValue;
test_txt.text = list;
test2_txt.text = len;
//}
}
};
theBtn.onRelease = function() {
Sender.url="http://the/url/Iam/trying/to/get"
Sender.sendAndLoad("proxy.php", GetData, "POST");
};
Now I can get this to work by declaring the url directly in the php like so:
<?php
$dataURL = "http://the/url/Iam/trying/to/get";
readfile($dataURL);
?>
though I want to be able to send a variable url called ‘url’ from flash to php to use in the readfile();
Now the problem is how do I send the variable url from flash to php?
I have tried changing the php to:
<?php
$dataURL= $_GET['url'];
readfile($dataURL);
?>
but this would not work.
I know this is an easy problem for loads of people here though so someone please help!:puzzle: