<script language=”javascript”>
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest()
} else {
xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP”)
}
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState==4 && xmlhttp.status==200){
var data = xmlhttp.responseText;
var string = JSON.stringify(data);
var json = string.replace(/\\/g,”);
var reg = /”output_url”:”(.*?)”/g;
m3u8 = json.match(reg);
wxtv1 = m3u8[14].match(/”output_url”:”(.*?)”/)[1];
wxtv2 = m3u8[18].match(/”output_url”:”(.*?)”/)[1];
wxtv3 = m3u8[16].match(/”output_url”:”(.*?)”/)[1];
wxtv4 = m3u8[22].match(/”output_url”:”(.*?)”/)[1];
wxtv5 = m3u8[20].match(/”output_url”:”(.*?)”/)[1];
var vid = location.href.split(‘html?id=’)[1];
var ch = [];
ch[‘wxtv1’] = wxtv1;
ch[‘wxtv2’] = wxtv2;
ch[‘wxtv3’] = wxtv3;
ch[‘wxtv4’] = wxtv4;
ch[‘wxtv5’] = wxtv5;
location.href=ch[vid];
}
}
var url = ‘http://fapi.wifiwx.com/mobile/api/wifiwx4.0/media_home.php?appkey=CshXUoKcUZrBc0OheGbJ7UWgv6b2MSjf&appid=21’;
xmlhttp.open(“get”, url, true);
xmlhttp.send();
</script>
存为:zhwx.html;
调用:zhwx.html?id=vid;
请登录后发表评论
注册