This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ver2.php
218 lines (176 loc) · 21.3 KB
/
ver2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script language=javascript>
function externalLinks()
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors[i];
if(anchor.getAttribute("href"))
anchor.target = "_blank";
}
}
window.onload = externalLinks;
</script>
<style type="text/css">#download-form{background:#FDFDFD;width:600px;padding:20px;margin-right:auto;margin-left:auto;border:1px solid #E9E9E9;border-radius:10px;margin-top:20px;}.lk{background:none repeat scroll 0 0 #DFFFF1;border:1px solid #D0F5E5;border-radius:5px;font-family:"museo-slab",serif;font-size:14px;margin-bottom:10px;margin-top:10px;padding:8px;}input[type="url"]{padding:5px;border:2px solid #ccc;-webkit-border-radius:5px;border-radius:5px;width:50%;font-family:Tahamo;font-size:18px;}input[type="url"]:focus{outline:none;}input[type=submit]{padding:5px 15px;background:#ccc;border:0 none;cursor:pointer;-webkit-border-radius:5px;border-radius:5px;}#submit{color:#fff;font-size:0;width:135px;height:60px;border:none;margin:0;padding:0;background:#0c0}input[type="submit"],input[type="reset"],input[type="button"],button,.button{-moz-appearance:none;-webkit-appearance:none;-ms-appearance:none;appearance:none;-moz-transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out,opacity 0.2s ease-in-out;-webkit-transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out,opacity 0.2s ease-in-out;-ms-transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out,opacity 0.2s ease-in-out;transition:background-color 0.2s ease-in-out,color 0.2s ease-in-out,opacity 0.2s ease-in-out;background-color:#1cb495;border-radius:6px;border:0;color:#ffffff!important;cursor:pointer;display:inline-block;font-weight:700;height:2.75em;line-height:2.75em;padding:0 1.125em;text-align:center;text-decoration:none;white-space:nowrap;}input[type="submit"]:hover,input[type="reset"]:hover,input[type="button"]:hover,button:hover,.button:hover{background-color:#1fcaa7;}input[type="submit"]:active,input[type="reset"]:active,input[type="button"]:active,button:active,.button:active{background-color:#199e83;}input[type="submit"].disabled,input[type="submit"]:disabled,input[type="reset"].disabled,input[type="reset"]:disabled,input[type="button"].disabled,input[type="button"]:disabled,button.disabled,button:disabled,.button.disabled,.button:disabled{opacity:0.5;}@media screen and (max-width: 480px) {input[type="submit"],input[type="reset"],input[type="button"],button,.button{padding:0;}}.ac_res{background:none repeat scroll 0 0 #FFF;border:1px solid #E5E5E5;display:none;font-size:.8em;left:8px!important;position:absolute;text-align:left;top:32px!important;width:352px!important;z-index:1000;}.ac_close{float:right;margin:3px;padding-right:10px;text-decoration:none;}.ac_inactive{background:none repeat scroll 0 0 #FFF;cursor:default;height:20px;line-height:20px;margin:0;overflow:hidden;padding-left:8px;}.ac_active{background:none repeat scroll 0 0 #EEE;cursor:pointer;height:20px;line-height:20px;margin:0;overflow:hidden;padding-left:8px;}a.active_link{color:#000;padding:0 0 0 4px;}body,html{margin:0;top:0;}body{background:url(bg.jpg) repeat scroll 0 0 transparent;color:#333;font-family:Segoe UI,trebuchet MS,Lucida Sans Unicode,Lucida Sans,Sans-Serif;font-size:1em;line-height:1.5em;margin:0 0 100px;}a{color:#254488;cursor:pointer;text-decoration:none;}.cloud_up{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -289px transparent;padding:0 0 0 18px;}.alsotry a{padding:0 8px 0 0;}.cloud_down{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -257px transparent;padding:0 0 0 18px;}.cloud_nochange{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -273px transparent;padding:0 0 0 18px;}.cloud_flow{float:left;font-size:.8em;width:20%}.content_sharing{font-size:.8em;width:300px;}#frame{background-color:#FFF;border:1px solid #CECECE;border-radius:6px;box-shadow:0 0 10px 5px #CCC;margin:10px auto;padding:0 10px;width:95%;max-width:1000px;}#content_nav{background:none repeat scroll 0 0 #f9f9f9;border-top:1px solid #CCC;clear:both;}#content_text{clear:both;font-size:.8em;padding:10px;}#content_nav_left{float:left;font-size:0.85em;max-width:668px;padding:5px 10px;width:100%;}#content_nav_left h1{display:inline;font-size:1em;font-weight:700;margin:0;padding:0;}#content_nav_right{float:left;font-size:0.75em;padding:5px 10px;text-align:right;}#content_related{clear:both;font-size:.8em;}.download_top{border-bottom:1px dotted #CCC;font-size:.8em;font-weight:700;padding:2px 0;}.star{background:url(/theme/mainsprite.jpg) repeat scroll 0 -398px transparent;display:block;float:left;height:11px;margin:6px 5px 0 0;width:12px;}.download_item{border-bottom:1px dotted #CCC;font-size:.8em;padding:2px 0;}.right_it{float:right;font-size:.9em;padding:0 5px 0 0;text-align:right;width:115px;}.sharing_frame{border:1px solid #EBEBEB;margin:0 0 10px;}#sharing_top{background:none repeat scroll 0 0 #F6F6F6;border-bottom:1px solid #EBEBEB;border-top:1px solid #FFF;padding:10px;}#footer_bottom{color:#999;font-size:.7em;margin:13px auto 10px;padding:0;text-shadow:0 -1px 1px #FFF;text-transform:uppercase;width:95%;max-width:1000px;}#footer_bottom a{color:#666;text-decoration:none;text-shadow:1px 1px 0 #FFF;}#content_download{float:left;max-width:820px;overflow:hidden;padding:4px;width:100%;}#content_page{float:left;max-width:680px;overflow:hidden;padding:4px;width:100%;}#content_banner{max-width:300px;float:left;font-size:.8em;margin:10px 0;padding:0 0 0 10px;text-align:left;width:100%;}.content_d_title_l{font-size:1.1em;font-weight:700;margin:10px 0;overflow:hidden;width:680px;}.alsotry{font-size:.75em;margin:0 0 10px;}.content_d_title_s{clear:both;font-size:.8em;}.bolder a{color:#000;text-decoration:underline;}.bgframe{border-top:1px dotted #CCC;font-size:.8em;padding:10px 0;}.bg1{background:none repeat scroll 0 0 #FDFEFF;}.rsl_ico{float:left;padding:0;width:20px;}.bigdlbutton{background:url(/theme/download_big.png) repeat scroll 0 0 transparent;cursor:pointer;height:104px;margin:-20px 0 10px;width:300px;}.bigdlbutton:hover{background:url(/theme/download_big_hover.png) repeat scroll 0 0 transparent;}.rsl_info img{margin:5px 0 0;vertical-align:top;}.rsl_1{padding:5px 0 0;}.rsl_4{float:left;padding:5px 0;text-align:right;width:140px;}#footer_bottom a:hover{color:#254488;text-decoration:none;}#header_top{border-bottom:1px solid #CCC;clear:both;display:block;font-size:.8em;height:30px;line-height:30px;margin:0;padding:5px;}.content_dl_frame{clear:both;}.dl_frame{border-top:1px dotted #ccc;clear:both;height:30px;margin:0;width:98%;}.dl_1{float:left;font-size:0.8em;margin:5px 0 0;width:70%;}.dl_2{background:url(mainsprite.jpg) no-repeat scroll 0 -228px transparent;cursor:pointer;float:right;height:21px;margin:5px 0 0;text-align:right;width:auto;}.dl_4{background:url(mainsprite.jpg) no-repeat scroll 0 -580px transparent;cursor:pointer;float:right;height:21px;margin:5px 0 0;text-align:right;width:24px;}.dl_2:hover{background:url("mainsprite.jpg") no-repeat scroll 0 -207px transparent;float:right;height:21px;text-align:right;width:104px;}.dl_3{cursor:pointer;float:right;font-size:.9em;height:21px;margin:2px 0 0;text-align:right;width:104px;}.dl_3:hover{float:right;height:21px;text-align:right;width:104px;}#page_frame{clear:both;margin:0;padding:0;width:100%;max-width:1000px;}#search_form{display:inline;}input,select,textarea{font-family:Segoe UI,trebuchet MS,Lucida Sans Unicode,Lucida Sans,Sans-Serif;}pre.prelinks{background:none repeat scroll 0 0 #F9F9F9;border:1px inset #CCC;clear:both;font-family:Segoe UI,trebuchet MS,Lucida Sans Unicode,Lucida Sans,Sans-Serif;margin:0;max-height:500px;overflow:hidden;padding:5px;}#logo{float:left;margin:11px 0 10px;width:60%;}#search{float:left;margin:15px 0 10px;min-width:300px;width:40%;}textarea.dllink{height:70px;width:680px;}.search_input{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:#CCC #999 #999 #CCC;border-image:none;border-style:solid;border-width:1px;color:#333;font-size:.85em;font-weight:400;margin:0;outline-width:0;padding:6px;vertical-align:top;width:70%;}.search_option_2{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:#CCC #999 #999 #CCC;border-image:none;border-style:solid;border-width:1px;font-size:.8em;height:34px;margin:0 0 0 -1px;outline-width:0;padding:6px;vertical-align:top;width:80px;}.search_button{background-color:#0099ff;border-width:0;color:#ffffff;cursor:pointer;font-size:0.8em;height:34px;margin:0 0 0 -1px;outline-width:0;padding:0;vertical-align:top;width:20%;}.search_button:hover{background-color:#33CCFF;}.icon16{height:16px;vertical-align:middle;width:16px;}#header_top_right a{padding:0 0 0 14px;}#header_top_right,span#footer_bottom_right{float:right;text-align:right;}.rsl_2,.rsl_3{float:left;padding:5px 0;text-align:right;width:130px;}.rsl_info span{color:green;}span.r{color:#DD581F;}.rsl_info{font-size:.9em;}#search_info{color:#666;font-size:.75em;padding:2px 0 0 13px;text-align:left;vertical-align:top;}.cml_t{font-weight:700;padding:5px 0 0;}.arrow-down{background-image:url(mainsprite.jpg);background-position:left -172px;height:15px;width:15px;}.arrow-up{background-image:url(mainsprite.jpg);background-position:left -188px;height:15px;width:15px;}.pagination{border-top:1px dotted #ccc;clear:both;font-size:0.8em;overflow:scroll;padding:10px 0;width:100%;}.footer_latest{border-top:1px dotted #CCC;clear:both;font-size:.8em;height:120px;margin:15px 0 0;padding:10px;}.even{float:left;width:25%}.pagination a{background:none repeat scroll 0 0 #F2FAFD;border:1px dotted #CCC;margin:0 4px 0 0;padding:3px 10px;}.pagination .active{color:red;text-decoration:underline;}.content_results_frame{clear:both;width:100%;}.content_results_left{border-bottom:1px dotted #ccc;border-right:1px dotted #ccc;float:left;font-size:0.8em;margin:0 10px 20px 0;max-width:150px;width:100%;}.content_results_right{float:left;max-width:820px;width:100%;}.cloud_flow_big{float:left;font-size:.8em;width:33%}#cloud_index{clear:both;margin:10px;}.bolder a:hover,a:hover{color:red;}.cml_l a:hover,.rsl_1 a,.rsl_1 a:hover{text-decoration:underline;}.form_frame{font-size:1em;height:45px;width:600px;}.form_left{float:left;height:45px;line-height:45px;width:150px;}.form_right{float:right;height:40px;padding-top:5px;text-align:left;width:450px;}#error{background:none repeat scroll 0 0 #FFF2F2;margin:10px 0;padding:10px;}#notice{background:none repeat scroll 0 0 #FFFFE6;margin:10px 0;padding:10px;}#success{background:none repeat scroll 0 0 #EAFFEA;margin:10px 0;padding:10px;}.form_avatar{border:1px solid #DDD;float:left;height:50px;margin:0 10px 0 0;padding:2px;width:50px;}input.post_input,select.post_select{background-color:#F9F9F9;border:1px solid #CCC;color:#181818;font-family:trebuchet MS,Lucida Sans Unicode,Lucida Sans,Sans-Serif;font-size:1em;padding:5px;width:250px;}input.post_input{width:250px;}.button1{background:url(/theme/bg-button.gif) repeat-x scroll 0 0 #DDD;border:1px solid #BBB;border-radius:3px;cursor:pointer;font-size:1em;margin:0;padding:6px 12px;}.button1:hover{border:1px solid #A5BADA;}.btnsmall{padding:2px 10px;}.chrome{background:url(/theme/mainsprite.jpg) repeat scroll 0 -429px transparent;cursor:pointer;float:right;height:16px;margin:6px -5px 0 10px;width:103px;}.chrome:hover{background:url(/theme/mainsprite.jpg) repeat scroll -104px -429px transparent;}textarea.textit{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:#CCC #999 #999 #CCC;border-image:none;border-style:solid;border-width:1px;font-size:1em;height:18px;overflow:hidden;padding:7px;width:95%;}.vote_box{background:none repeat scroll 0 0 #FFF;margin:10px 0 0 620px;position:absolute;z-index:1000;}.vote_frame{margin:0 0 0 5px;width:60px;}#vote_up{background:url(/theme/mainsprite.jpg) repeat scroll 0 -526px transparent;cursor:pointer;float:left;height:23px;margin:0 3px;width:24px;}#vote_up:hover{background:url(/theme/mainsprite.jpg) repeat scroll -24px -526px rgba(0,0,0,0);}#vote_down:hover{background:url(/theme/mainsprite.jpg) repeat scroll -24px -549px rgba(0,0,0,0);}#vote_down{background:url(/theme/mainsprite.jpg) repeat scroll 0 -549px transparent;cursor:pointer;float:right;height:23px;margin:0 3px;width:24px;}#vote_down_count,#vote_up_count{color:#666;float:left;font-size:.7em;text-align:center;width:30px;}.login_fb{background:url(/theme/mainsprite.jpg) repeat scroll 0 -449px transparent;cursor:pointer;float:left;height:22px;margin:0 10px 0 0;width:150px;}.login_tw{background:url(/theme/mainsprite.jpg) repeat scroll 0 -495px transparent;cursor:pointer;float:left;height:22px;margin:0 10px 0 0;width:150px;}.login_go{background:url(/theme/mainsprite.jpg) repeat scroll 0 -472px transparent;cursor:pointer;float:left;height:22px;margin:0 10px 0 0;width:150px;}.cloud_item{border-bottom:1px dotted #CCC;float:left;font-size:.8em;margin:0 20px 0 0;width:320px;}.cloud_item3{border-bottom:1px dotted #CCC;float:left;font-size:.8em;margin:0;width:300px;}span.cloud_right{color:#666;float:right;font-size:.9em;text-align:right;width:40px;}span.change_icon_down{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -409px transparent;display:block;float:left;height:11px;margin:6px 0 0;width:12px;}span.change_icon_up{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -398px transparent;display:block;float:left;height:11px;margin:6px 0 0;width:12px;}span.change_icon_none{background:url(/theme/mainsprite.jpg) no-repeat scroll -24px -398px transparent;display:block;float:left;height:11px;margin:6px 0 0;width:12px;}span.change_icon_new{background:url(/theme/mainsprite.jpg) no-repeat scroll -24px -409px transparent;display:block;float:left;height:11px;margin:6px 0 0;width:12px;}span.cloud_count{color:#CCC;display:block;float:left;width:23px;}.bolder,.btnbold{font-weight:700;}#header_top_left,.form_text{float:left;}.share_1{font-size:.8em;font-weight:700;height:35px;margin:15px 0 0;vertical-align:top;}.share_2{float:left;padding:0 20px 0 0;}.share_3{float:left;padding:0 5px 0 0;}.share_4{float:left;padding:0 0 0 5px;}.ds1{border-bottom:1px dotted #CCC;height:23px;margin:0 0 7px;padding:0 0 7px;}span.smallvote{color:#666;font-size:1em;padding:0 2px;}.vup{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -397px transparent;height:12px;margin:6px 2px 0 0;padding:0;vertical-align:top;width:12px;}.vdown{background:url(/theme/mainsprite.jpg) no-repeat scroll 0 -409px transparent;height:12px;margin:6px 2px 0 8px;padding:0;vertical-align:top;width:12px;}.votediv{display:inline;vertical-align:top;}.txt_fp{background:none repeat scroll 0 0 #FDFEFF;border-bottom:1px dotted #CCC;border-top:1px dotted #CCC;font-size:.8em;margin:0 0 10px;padding:10px 0;}.bgframe:hover,.download_item:hover{background:none repeat scroll 0 0 #FFF8E7;}.s16,.s23,.s39,.s49,.s50,.s52,.s7{background:url(sprite.png) repeat scroll 0 -96px rgba(0,0,0,0);}.s260,.s53{background:url(sprite.png) repeat scroll 0 -832px transparent;}.download_top2{border-bottom:1px dotted #CCC;font-size:.8em;font-weight:700;height:28px;line-height:28px;}.download_item2{background:url(mainsprite.jpg) no-repeat scroll 0 -142px transparent;border-bottom:1px dotted #CCC;font-size:.8em;height:28px;line-height:28px;padding:0 0 0 20px;}.maintable2{border-collapse:collapse;font-size:.75em;}table.maintable2{width:100%}.maintable2 tr.g{background:url(td_bg.png) repeat scroll 0 0 transparent;}.maintable2 td{border-top:1px solid #CCC;padding:5px;vertical-align:top;}.maintable2 th{cursor:none;padding:5px;text-transform:uppercase;}.icon-sprite{width:25px;height:25px;background:url(./sprites.png) left top no-repeat!important;display:inline-block;position:relative;margin-top:-15px;top:10px;border-radius:20px;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.1);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.1);-o-box-shadow:0 0 5px 0 rgba(0,0,0,.1);box-shadow:0 0 5px 0 rgba(0,0,0,.1);}.fb_iframe_widget,.fb_iframe_widget span,.fb_iframe_widget span iframe[style]{min-width:100%!important;width:100%!important;}.mediafire{background-position:-115px!important;}.megashare{background-position:-30px!important;}.sharevn{background-position:-58px!important;}.share{background-position:-88px!important;}.tenlua{background-position:-148px!important;}.rapid{background-position:-180px!important;}.mega{background-position:-215px!important;}.baidu{background-position:-283px!important;}.uploadch{background-position:-318px!important;}.direct{background-position:-249px!important;}</style>
</head>
<body>
<center>
<br>
<!--<form action="#" method="GET">
<input type="text" name="url" id="url">
<input type="submit" id="url" value="Get link">
</form>-->
<?php
use Symfony\Component\DomCrawler\Crawler;
require_once __DIR__.'/vendor/autoload.php';
global $client;
function getLinkType($url){
$regex = "/http:\\/\\/mp3\\.zing\\.vn\\/(bai-hat|album|video-clip|playlist)\\/(?:.*)/";
preg_match($regex, $url, $matches);
if(count($matches)===2){
return $matches[1];
}
else{
return FALSE;
}
}
function getXMLLink($content){
$regex = "/xmlURL=(http:\\/\\/mp3\\.zing\\.vn\\/xml\\/[song|video|album]+-xml\\/[a-zA-Z]+)&/";
preg_match($regex, $content, $matches);
if(count($matches)===2){
return $matches[1];
}
else{
return FALSE;
}
}
function getPageContent($url)
{
global $client;
if(!$client) {
$client = new GuzzleHttp\Client();
}
$res = $client->get($url);
if($res->getStatusCode() === 200){
return $res->getBody()->getContents();
}
else{
return null;
}
}
if (isset($_GET['url'])){
$type = getLinkType($_GET['url']);
if(!$type){
die('Link is not valid');
}
$content = getPageContent($_GET['url']);
if(!$content){
die('Can not get page content');
}
$xmlLink = getXMLLink($content);
if(!$xmlLink){
die('Can not get xml Link');
}
$link1 = explode('/', $xmlLink);
//echo $link1[5].'<br/>';
function get_by_curl($url){
//echo "curl:url<pre>".$url."</pre><BR>";
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "spider", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 15, // timeout on connect
CURLOPT_TIMEOUT => 15, // timeout on response
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
CURLOPT_SSL_VERIFYPEER => false,
);
$ch = curl_init($url);
curl_setopt_array( $ch, $options );
$content = curl_exec( $ch );
$err = curl_errno( $ch );
$errmsg = curl_error( $ch );
$header = curl_getinfo( $ch,CURLINFO_EFFECTIVE_URL );
curl_close( $ch );
//$header['errno'] = $err;
// $header['errmsg'] = $errmsg;
//change errmsg here to errno
if ($errmsg)
{
echo "";
}
return $content;
}
function Get_Title1($url){
$linktitle = $url;
$get = get_by_curl($linktitle);
preg_match('/<title>(.*?)<\/title>/',$get, $display);
$Albums = explode('|', $display[1]);
$Title = explode(' - ', $Albums[0]);
return $Title[0];
}
function Get_Title2($url){
$linktitle = $url;
$get = get_by_curl($linktitle);
preg_match('/<title>(.*?)<\/title>/',$get, $display);
$Albums = explode('|', $display[1]);
$Title = explode(' - ', $Albums[0]);
return $Title[1];
}
echo '<h1>Tên Album: '.Get_Title1($_GET['url']).'</h1>';
echo '<h2>Trình Bày: '.Get_Title2($_GET['url']).'</h2>';
$link = explode('/', $_GET['url']);
$links = explode('.', $link[5]);
$str = str_replace( '-', ' ', $link[4] );
//echo $str.'<br/>';
if ($type == 'album')
{
$arr = explode("/",$_GET['url']);
$id = str_replace(".html","",$arr[count($arr)-1]);
$url = "http://m.mp3.zing.vn/xml/album/".$link1[5];
//echo $url.'<br/>';
$json = json_decode(get_by_curl($url), true);
$id = $json['data'][0]['id'];
for ($i = 0; $i < count($json['data']); $i++){
$id = $json['data'][$i]['id'];
$link = "http://api.mp3.zing.vn/api/mobile/song/getsonginfo?requestdata={\"id\":\"$id\"}";
$album = json_decode(get_by_curl($link), true);echo '<br/><br/>';
//Tiêu đề
echo '<h1>Tên bài: '.$album['title'].'</h1>';
//Thể hiện
echo '<h2>Thể hiện: '.$album['composer'].'</h2>';
//Thumb
echo '<TABLE BORDER="1"><td>
<img src="http://image.mp3.zdn.vn/'.$album['thumbnail'].'" width="200" "/></td>';
//Link mp3
echo '<td><center>Download:<br/><br/>';
echo '<a href="'.$album['source']['128'].'" download>128Kb</a><br/><br/>';
echo '<a href="'.$album['source']['320'].'" download>320Kb</a></center></td></TABLE><hr/>';
//if($album['link_download']['lossless']){
//echo 'lossless: '.$album['source']['lossless'].'<br>';
//}
//Link download mp3
//echo 'List download mp3: <br>';
//echo '128k: '.$album['link_download']['128'].'<br>';
//echo '320k: '.$album['link_download']['320'].'<br>';
//if($album['link_download']['lossless']){
//echo 'Lossless: '.$album['link_download']['lossless'].'<br>';
//}
//Link lyric
//echo 'Link lyric: '.$album['lyrics_file'].'<br>';
//echo '<br><br><br>';
}
}
else if($type == 'bai-hat'){
}
}
?>
</center>
<title><?=Get_Title1($_GET['url'])?> - <?=Get_Title2($_GET['url'])?> - Lưu Trữ 360</title>
</body>
</html>