可以从随机网页上下载html吗? [英] Can flash download html from random webpage?

查看:320
本文介绍了可以从随机网页上下载html吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已放弃尝试在AS3中获取网页的来源(我不拥有此服务器)。它所做的就是抛出沙箱违规错误(2048)。到目前为止,我得出的结论是,唯一的解决方案是:

I have given up on trying to get the source of a webpage (I don't own this server) in AS3. All it does is throw an sandbox violation error (2048). So far I have come to a conclusion that the only solutions possible are:


  • 让我的web服务器将内容提供给swf。 li>
  • 使用crossdomain.xml为swf创建代理服务器。

被我的老年人和我被推向更好的解决方案。

Somehow, both the options are being rejected by my seniors & I am being pushed for a better solution.

我没有任何想法,如果有其他可能,有没有人有一个?



EDIT:
也许一些黑客可能不需要策略文件直接与'A''B'

I don't have any idea if anything else is possible, does anyone here have one??


EDIT : Maybe some hack where 'A' may not need the policy file to communicate directly with 'B' :

推荐答案

我认为一个简单的PHP代理是最简单的方法:

I think a simple PHP proxy is the easiest way:

<?php
  echo system ("curl \"".$_GET["url"]."\"");
?>

并使用

http://www.yourserver.com/pathtoyourscript/proxy.php?url=http://www.yoururl.com

未测试,但一般来说应该能正常工作。

not tested, but in general it should work.

这篇关于可以从随机网页上下载html吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆