开发者

Access XML page via ActionScript 3 (bypassing login screen first)

开发者 https://www.devze.com 2023-03-12 23:56 出处:网络
Need some help here :P What im trying to do is simply get some data from an xml page located on a server.

Need some help here :P

What im trying to do is simply get some data from an xml page located on a server.

However, the server first requires a username/password combination before i even get to see the xml content. What it does, is pr开发者_如何学Pythonesent a login form, that requires a user to provide credentials. Once the user hits the login, a js function is run, which logs the user in and then presents XML content to the user without ever redirecting the user to a different page.

So what im trying to ask is, is there a way (and if so, how) can i retrieve the XML of a page that first requires me to provide login details to the server?

Cheers


i'm assuming the XML data on the server is dynamic, otherwise you could simply copy and bundle the data into your own website - obviously.

i'm not sure of the nature of this data, but sometimes data can be accessed thru a website's backdoor, legally. you could try a quick search to see if this data is available publically, or even contact the data holder to find out for sure. in any case, you'll need to have a cross-domain policy file to access data that is not hosted on your own domain.

You cannot load variables or XML data into a Flash movie from another domain. For example, a Flash movie loaded from http://www.yourserver.com/flashmovie.swf can access data residing at http://www.yourserver.com/data.txt. The text file is located within the same domain as the SWF.

However, an attempt to load data from http://www.NotMyServer.com/data.txt will fail and no error messages are displayed. The load action will cause a warning dialog to appear.

Note: This security feature does not affect Flash movies playing in stand-alone projectors.

if the data is publicly available, there is probably a way to bypass this security restriction by using JavaScript and ExternalInterface to capture the data, but i'm not well versed with such routines.

this security restriction is not applicable to AIR applications.

more: Cross-domain policy for Flash movies

0

精彩评论

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

关注公众号