我想下载此文件
http://193.111.141.206:8000/live/mirko/mirko/22.m3u8
并希望保存在服务器上。
我有这个PHP脚本:
<?php
$ts1 = http://193.111.141.206:8000/live/mirko/mirko/22.m3u8;
file_put_contents("stream.m3u8", fopen($ts1, 'r'));
?>
我收到此错误
Warning: fopen( http://193.111.141.206:8000/live/mirko/mirko/22.m3u8): failed to open stream: Connection timed out in /home/.../download.php on line 25
Manualy我可以打开这个文件,但是php说连接超时了...... 有人知道解决方案吗?
答案 0 :(得分:0)
谢谢大家。
我将网站转移到另一台服务器,file_get_contents
,file_put_contents
功能正常工作。
P.S。
exec('wget http://google.com/index.html -whateverargumentisusedforoutput', $array);
服务器将此代码视为恶意软件:)