Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 修改flash对象_Php_Flash_Zlib_Swfobject - Fatal编程技术网

Php 修改flash对象

Php 修改flash对象,php,flash,zlib,swfobject,Php,Flash,Zlib,Swfobject,我希望通过代理访问特定网站的嵌入式视频。这样做的原因不是为了违反他们的TOS,而是为了我可以在HTTPS网站上提供他们的内容 我能够使用以下代码解压和重新压缩swf对象: $input = file_get_contents("/tmp/swf.swf"); $header = substr($input, 0, 8); $header_old = $header; $data = substr($input, 8); $header[0] = "F"; $data = gzuncompress

我希望通过代理访问特定网站的嵌入式视频。这样做的原因不是为了违反他们的TOS,而是为了我可以在HTTPS网站上提供他们的内容

我能够使用以下代码解压和重新压缩swf对象:

$input = file_get_contents("/tmp/swf.swf");
$header = substr($input, 0, 8);
$header_old = $header;
$data = substr($input, 8);
$header[0] = "F";
$data = gzuncompress($data);
//$data = str_replace('http://.../','https://localhost/',$data);

$data2 = $header_old.gzcompress($data);
file_put_contents($tmp."2.swf",$data2);
当我在localhost上查看他们的swf文件时,我会收到一条外观正常的错误消息,如果我使用注释行运行代码,也会收到同样的错误消息

如果取消对replace函数的注释,那么swf对象的行为将异常。我也尝试不重新压缩输出,结果类似


这可能是因为swf对象中存在某种校验和吗?

也许您应该发布错误消息或解释什么是“异常行为”,iFlash不会给出“错误”。我提到的错误消息是正常行为(“无法加载视频”-因为跨域策略)。至少,我要问的是校验和。我指的是“我收到一条看起来正常的错误消息”和“swf对象的行为异常”