-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlyricInfo.php
35 lines (26 loc) · 922 Bytes
/
lyricInfo.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
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<link rel="stylesheet" href="css.css" type="text/css" />
<meta name="viewport" content="width=device-width, content="width=device-width,initial-scale=1" /><title>网易云音乐</title></head><html><body>
<?php
require('curl.class.php');
$id = $_GET['id'];
$name = $_GET['name'];
if($id == false){
exit('<div class =\'error\'>错误:ID未传入!</div>');
}
$json = json_decode(lyric($id));
//print_r($json);
$lyric = str_replace('[','<hr />[',$json->lrc->lyric);
if($lyric == false){
exit('<div class =\'error\'>错误:暂无歌词!</div>');
}
echo<<<html
<div class ='menu shadow'>歌曲: {$name}</div><div class ='lyric'>
{$lyric}
</div>
<div class = "menu font top"> Copyright © 2017 Powered By Bruce Au </div>
</body>
</html>
html;