开发者

loading a PHP page using loadVars in Flash

开发者 https://www.devze.com 2023-03-27 13:41 出处:网络
I\'m using loadVars to load a PHP URL with lots of sensitive information required for the Flash application. Only problem is that URL can be ac开发者_开发技巧cessed via a web browser which raises secu

I'm using loadVars to load a PHP URL with lots of sensitive information required for the Flash application. Only problem is that URL can be ac开发者_开发技巧cessed via a web browser which raises security issues if someone gets a hold of this URL. Is it possible to have the PHP page only accessible via my Flash application?

Appreciate the help!

Thanks


No, there is no way to limit a page to a specific app, browser or user agent, since all of those things can be mimicked. If you are passing around sensitive information then you need to do authentication and use encrypted data transfer (HTTPS).


Regardless of how you attempt to make it only accessible from your Flash application, a determined user will certainly be able to view the page also. It can be as simple as proxying the requests through an HTTP proxy like Charles, Firebug or Wireshark.

There are things that can be done to make it more difficult to figure out what the data is from viewing the page directly. For instance, you can encrypt the data or output it as binary. But since SWF is an open sourced format, users can use decompilers or just inspect the ABC (Actionscript Byte Code) to see what is really going on.

The short answer is NO, you cannot protect the information available to the client side (Flash) from being accessible from other clients.


As long as you have a page on HTTP, a determined user can always find a way around any user-agent restrictions imposed by you. One way to protect the data (other than using HTTPS) is to encrypt it at the server, send it over HTTP and then decrypt it in Flash using as3Crypto or some other cryptography library.

Hope this helps,

0

精彩评论

暂无评论...
验证码 换一张
取 消