Insane
↓↓xuống cuối trang↓↓
Chào mừng bạn đến với wap DinhLoi.XtGem.Com | Chúc bạn có 1 năm mới vui vẻ tốt lành hạnh phúc! Hãy giới thiệu website này cho bạn bè nhé!img
DinhLoi.XtGem.Com =>> CaFe9x.Gq
Bạn đến từ quốc gia: United StatesUnited States



Hôm nay ngày
25.04.24/10:37
img- Hi. Xin chào! Mozilla/5.0
logo
.
HOMECHÁTTruyệnFORUM
Trang chủ>Hướng dẫn làm wap>
Code get link album và bài hát nhaccuatui.com
11.07.2014/11:07
Demo:

Hướng dẫn sử dụng: Tạo tập tintuoitreit_getnhaccuatui.phpdán code này vào
<?php
function checkLink($link) {
$regex_link = '/http://(www.)?nhaccuatui.com/bai-hat/.*/';
if (preg_match($regex_link, $link)) {
return 'bai-hat';
}
$regex_link = '/http://(www.)?nhaccuatui.com/playlist/.*/';
if (preg_match($regex_link, $link)) {
return 'album';
}
return null;
}
function getCode($link, $type) {
$content = file_get_contents($link); //Lấy nội dung html
$links = array();
$temp = array();
switch ($type) {
case 'bai-hat':
preg_match('/NCTNowPlaying.intFlashPlayer("flashPlayer",s"song",s"(.*)"/', $content, $temp); //Lấy nội dung từ fmt_url_map= choi tới dấu &
break;
case 'album':
preg_match('/NCTNowPlaying.intFlashPlayer("flashPlayer",s"playlist",s"(.*)",s"1",s"(.*)"/', $content, $temp); //Lấy nội dung từ fmt_url_map= choi tới dấu &
break;
}
if (isset($temp[1])) {
$links = $temp[1];
}
return $links;
}
$content = "";
if (isset($_POST['link'])) {
$link = $_POST['link'];
$type = checkLink($link);
if (!empty($type)) {
$code = getCode($link, $type);
if (!empty($code)) {
$xmlLink = '';
switch ($type) {
case 'bai-hat':
$xmlLink = ' http://www.nhaccuatui.com/flash/xml?key1=' . $code;
break;
case 'album':
$xmlLink = ' http://www.nhaccuatui.com/flash/xml?key2=' . $code;
break;
}
$musics = new SimpleXMLElement(file_get_contents($xmlLink));
$content .= '<table>';
foreach ($musics->track as $item) {
$content .= '<tr>';
$content .= '<td>' . $item->title . "</td><td>" . $item->location . '</td>';
$content .= '</tr>';
}
$content .= '</table>';
} else {
$content .= '<br/>Đường dẫn không hợp lệ';
}
} else {
$content .= '<br/>Đường dẫn không hợp lệ';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
table {
margin-top: 20px;
}
table td {
margin: 5px;
padding: 5px;
border: 1px dotted #777;
}
</style>
</head>
<body>
<center><h1>Get link nhaccuatui.com</h1></center>
<form action="" method="post">
Link bài hát hoặc album <input input="text" name="link"/><input type="submit" value="Get link ngay"/>
</form>
<?php
if (!empty($content)) {
echo $content;
}
?>
</body>
</html>
COPY CODE:Chúc các bạn thành công!
Nguồn: tuoitreit.vn
Tag:
Bạn đến từ:
Share: img img img img img

Thanks To:XtGem
Liên kết:U-ON