抓到http://interface.yy.com/hls/new/get/41724742/41724742/1200?source=wapyy&callback=jsonp2
返回jsonp2({"height":600,"width":800,"code":0,"hls":"http://proxy.hls.yy.com/livesystem/15013_xv_41724742_41724742_0_0_0-15013_xa_41724742_41724742_0_0_0.m3u8?org=yyweb&uuid=381d09547ed340c58413143ac4448bbe&t=1529034144&tk=b295cfe3c7fee95816cc8e7a017b094a"})
用php抓包 返回的是
jsonp2({"code":1,"hls":"404"})
代码
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://interface.yy.com/hls/new/get/41724742/41724742/1200?source=wapyy&callback=jsonp2");
$headx = array();
$headx[] = 'Host:interface.yy.com
Pragma:no-cache
Referer:http://wap.yy.com/';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headx);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //这个是重点
$x = curl_exec($ch);
curl_close($ch);
var_dump($x);
我上面header貌似写的不对 怎么写来着
Helenr
明月笑刀无情