PDA

View Full Version : Hide XML from public with a PHP file loaded in Flash



detonate
January 13th, 2007, 12:25 PM
Hello everyone,
I'm trying to pull my xml file silently(so public can't access and view all my image paths, text info etc.).

So far it's not working, seems like nothing is happening. When I originaly used the url.xml in flash everything is A-ok.


my getxml.php file
<?php
$xml = $_POST['url.xml'];
readfile($xml);
?>
-----------------------------------------

my normal xml call that works perfect when I use the .xml extention

var contentXML:XML = new XML();
//contentXML.load("url.xml"); //works perfectly
contentXML.load("getxml.php");
contentXML.ignoreWhite = true;
contentXML.onLoad = function(ok) {
if(ok) {
makeMenu(contentXML.firstChild);
}
};

Any help would be very appreciated!

evildrummer
January 13th, 2007, 02:51 PM
why do you need to hide it, and it would be severely difficult unless you actually pasred the XML using the PHP then created an array which gets imported into flash which then gets interpereted, explain more about what you are doing and I can help more.

detonate
January 13th, 2007, 07:25 PM
Thanks for pointing that out...
The reason is because it's a photography website. They are complaining that people can download/view the xml structure and rip their content. (Even publish RSS or blog etc.)
I know it sounds kinda odd but that's what happens when your caught up dealing with "joe know it all" picture boy

Hmmm, if the only solution is to parse and output arrays and then load in flash for xml readability I give up! This will be way too complexe since they have lots of categories and a fair amount of content/imagery.

:red: I'm definitly in for a big one as I can see