I'll try to explain my query in the best of my ability. I would appreciate your help in this :)
There is a flash application (SWF) that I am outputting via a PHP file using header("Content-type: application/x-shockwave-flash");
Case A: When this flash file is loaded from http://www.a.com/flash.php?display=hello, it works the way it was intended to. Say for example it displays "hello".
Case B: When this flash file is loaded from http://www.b.com/flash.php?display=hello, it does not work. Say now it displays "Bye bye".
Important thing to note is that I did send the display=hello on the www.b.com but it somehow internally checks that it is being called from a 开发者_如何学Cwebsite other than www.a.com and defaults to "bye bye".
The flash file is on the local web-server as flash.swf
How can I set the headers in that PHP file so that the the flash.swf thinks it is being called from www.a.com rather than www.b.com, even though it is.
I do not know how the flash.swf file is doing all these checks. and I don't think there is anyway for me to find out (decompile swf, etc -- but I'd like to avoid that route).
Is there perhaps a header I can set in the PHP file or set an environment variable to fix this issue?
If a.com is not under your control, I don't think this is possible to circumvent, because Flash can check for the current movie's URL in the browser, which you won't be able to manipulate in PHP.
If a.com is under your control, you could use an iframe as @Khez points out.
Otherwise, you'll have to talk to the author of the original Flash file and ask for the check to be changed (which is probably what you want to circumvent in the first place).
This will not be possible for security reasons.
For example, if your bank was trying to run this file, being able to fake the source would mean someone could steal from you.
The browser will enforce this and will prevent you from faking the source of your request, so it will not be possible for you to change this.
精彩评论