-
Notifications
You must be signed in to change notification settings - Fork 25
/
album.php
98 lines (98 loc) · 4 KB
/
album.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
<?php
set_time_limit(0);
ignore_user_abort(1);
if(!$_GET['id']||!is_numeric($_GET['id'])){
header('location: index.php');
exit;
}
$ch = curl_init('http://api.joox.com/web-fcgi-bin/web_get_albuminfo?albumid='.trim($_GET['id']).'&lang=id&country=id&from_type=null&channel_id=null&_='.time());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36');
$json = curl_exec($ch);
curl_close($ch);
$json = json_decode($json);
if(!$json->albuminfo){
header('location: index.php');
exit;
}
$name = base64_decode($json->albuminfo->creator->name);
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Donlod Lagu Ori Disini Coeg">
<meta name="author" content="Anon">
<link rel="icon" href="assets/images/favicon.ico">
<title><?=$name?> - Donlod Lagu Gratis</title>
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
padding-top: 80px;
}
</style>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">DonlodLagoe</a> </div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php"><i class="glyphicon glyphicon-home"></i> Index</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title"><?=$name?> - DunludLagu Gratis</div>
</div>
<div class="panel-body">
<div class="text-center">
<img class="img-circle" height="128" width="128" src="<?=$json->albuminfo->picUrl?>">
<h2><?=$name?></h2>
<p><small><i>Waktu rilis: <?=base64_decode($json->albuminfo->date)?></i></small></p>
</div><hr>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>#</th>
<th>Song Name</th>
<th>Artis</th>
<th>Album</th>
<th>Playtime</th>
</tr>
</thead>
<tbody>
<?
$r = 0;$rf = count($json->albuminfo->songlist);
for($i=0;$i<$rf;$i++):
$r++;
print '<tr><td>'.$r.'</td><td><a href="song.php?id='.base64_encode($json->albuminfo->songlist[$i]->songid).'">'.base64_decode($json->albuminfo->songlist[$i]->songname).'</a></td><td><a href="singer.php?id='.$json->albuminfo->songlist[$i]->singerid.'">'.base64_decode($json->albuminfo->songlist[$i]->singername).'</a></td><td><a href="album.php?id='.$json->albuminfo->songlist[$i]->albumid.'">'.base64_decode($json->albuminfo->songlist[$i]->albumname).'</a></td><td><b>'.gmdate('i:s', $json->albuminfo->songlist[$i]->playtime).'</b></td></tr>';
endfor; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>