Home  >  Article  >  Backend Development  >  关于php采集网页数据获取js动态数据的有关问题

关于php采集网页数据获取js动态数据的有关问题

WBOY
WBOYOriginal
2016-06-13 12:22:202056browse

关于php采集网页数据获取js动态数据的问题
http://www.xjtvs.com.cn/uyghur/special/apply/b/2015-4-28/1430189054690.shtml
给一个网页地址,我要获取这个视频的下载地址,虎鱼网的,
然后在网页源码中没有下载地址,
这是关于视频播放那段的代码

然后在控制台里可以看到视频加载后的地址,就是那个 http开头的,可以下载
我想用php获取这个js动态加载的视频地址,求方法,求思路

------解决思路----------------------
我给你第一步,剩下的你自己走

$url = 'http://www.xjtvs.com.cn/uyghur/special/apply/b/2015-4-28/1430189054690.shtml';<br />$s = file_get_contents($url);<br />preg_match("#http://static.vms.sobeycache.com/[^']+#", $s, $m);<br />echo file_get_contents($m[0]);<br />

------解决思路----------------------
看样子只能浏览器渲染之后才能得到结果

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn