【发布时间】:2017-09-19 12:22:46
【问题描述】:
我想从此页面获取“文件”m3u8“view-source:http://www.freelivestream.tv/embedPlayer.php?file=cartoon”
我正在尝试这段代码,但没有得到它所提供的全部价值,请提供任何帮助
<?php
$url = "http://www.freelivestream.tv/embedPlayer.php?file=cartoon";
$contents = file_get_contents($url);
preg_match('@m3u8([^"]+)@',$contents,$filo);
$filo = urldecode($filo[0]);
echo $filo;
?>
但我的代码只给出:m3u8?wmsAuthSign=c2VydmVyX3RpbWU9OS8xOS8yMDE3IDEyOjE4OjEyIFBNJmhhc2hfdmFsdWU9aGI4bVZBZEdKY3E3ZVpFOWx3REdadz09JnZhbGlkbWludXRlcz01
谢谢
【问题讨论】:
-
使用此代码然后分解并使用它 freelivestream.tv/embedPlayer.php?file=cartoon"; $contents = file_get_contents($url); preg_match('@file:(.*)@',$contents,$filo); $filo = urldecode($filo[0]);回声 $filo;?>
标签: php file-get-contents