Một đoạn script đơn giản để get link từ NCT

var link = document.getElementById('FlashNCTplayer').src;
var host = String(window.location.hostname);
var current = String(document.location);
if (host != 'www.nhaccuatui.com') {
createBox('<li>Đã tích hợp thành công vào nhaccuatui.com</li><li>Bạn hãy bấm vào <a href="javascript:cmon();">đây</a> để reload trang web này.</li>', '<li>Sau khi trang web đã reload xong, bạn hãy kích hoạt jgrabber một lần nữa để lấy link.</li><li><b>Chú ý: </b>Đây là một hạn chế của javascript, không phải là lỗi của jgrabber.</li>');
}

if (window.XMLHttpRequest) {
XHR = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XHR = new ActiveXObject("Msxml2.XMLHTTP");
}

XHR.open('GET', link);
XHR.onreadystatechange = function() {
if (XHR.readyState == 4) {
link = XHR.getResponseHeader("Content-Location").match(/file=(.*)/)[01];
if (window.XMLHttpRequest) {
XHR2 = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XHR2 = new ActiveXObject("Msxml2.XMLHTTP");
}
XHR2.open('GET', link);
XHR2.onreadystatechange = function() {
if (XHR2.readyState == 4 &amp;&amp; XHR2.status == 200) {
link = XHR2.responseText.match(/<\/creator><location>(.*?)<\/location>/)[01];
alert(link); // Link đây nè
}
}
XHR2.send(null);
}
}
XHR.send(null);

function cmon() {
document.location.replace(current.replace('nhaccuatui.com', 'www.nhaccuatui.com'));
}

Popularity: 8% [?]


  1. No comments yet.

  1. No trackbacks yet.

Chọn kiểu gõ: Tự động TELEX VNI Tắt

Bad Behavior has blocked 47 access attempts in the last 7 days.