PDA

View Full Version : proxy.php load variables across domain


phastings
11-08-2006, 05:56 AM
Hi,
I'm trying to load variables from a script on a server that I unforturnatly don't have access to. I’ve read all the post and looked at the adobe tech notes on this(http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16520#proxy) but it will not work. Right now I have a php file that is just echoing some variables:

http://www.sakebomb.com/paul/test8/test.php

when I use:

loadVariables("http://www.sakebomb.com/paul/test8/test.php", this);

in the swf file on the same domain it works fine but when I put the test.php file on a different domain and point to it, it doesn’t work(this is just a test. I do not have access to the server that the script I’m really going to access is on)

So, I read up and found the ‘sever side proxy method’ mentioned in the adobe tech note above. According to it if I put the proxy.php file containing:

<?php

$dataURL = " http://www.sakebomb.com/paul/test8/test.php";

//note that this will not follow redirects
readfile($dataURL);

?>

and target

loadVariables("proxy.php", this);

from my flash movie where proxy.php and the swf are in the same location it should work.

I’m not getting any results though. I even tried to put the proxy.php in the same directory as the test.php just to see if anything was being outputted. When you enter:

http://www.sakebomb.com/paul/test8/test.php

you can see the variables but when you enter the proxy file:

http://www.sakebomb.com/paul/test8/proxy.php

the variables don’t get outputted. Shouldn’t they? Sorry about the long post but can anyone expain this or give me a better work around? Again, I have to access to the host server.

Cota
11-08-2006, 07:15 AM
The server hosting your proxy file needs an domain policy file
http://www.actionscript.org/forums/showthread.php3?t=114108

motherfu(ker
11-08-2006, 07:26 AM
when you enter the proxy file:

http://www.sakebomb.com/paul/test8/proxy.php

the variables don’t get outputted.When I enter it, I see HTTP 403 Forbidden