-
Notifications
You must be signed in to change notification settings - Fork 0
/
topartist.php
104 lines (102 loc) · 3.17 KB
/
topartist.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
<html>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Oswald">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open Sans">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<style>
.footerholder {
background: none repeat scroll 0 0 transparent;
bottom: 5;
position: fixed;
text-align: center;
width: 100%;
}
.footer {
color:#333333;
font-family:Oswald;
font-style:bold;
background: none repeat scroll 0 0 transparent;
margin: auto;
}
a{
color:white;
}
a:link {
text-decoration:none;
}
a:visited {
text-decoration:none;
}
a:hover {
text-decoration:none;
}
a:active {
text-decoration:none;
}
h1 {
font-family: 'Oswald', sans-serif;
color: white;
}
.heading
{
margin: auto;
width: 100%;
text-align: center;
padding-top: 20px;
padding-bottom: 20px;
background-color: #333333;
}
.h
{
color: #333333;
font-weight:bold;
}
.error
{
font-size:20px;
font-weight:bold;
color: #ff0000;
}
</style>
<head style="background-color:white">
<div class="heading">
<h1> <a href="main.php" title="That Track Though">That Track Though</a></h1>
</div>
</head>
<body>
<br>
<h2 style=font-family:Oswald> Top Artists </h2>
<br>
<?php
function get_artist($country,$pg_size){
$data = file_get_contents("http://api.musixmatch.com/ws/1.1/chart.artists.get?page=1&page_size=".$pg_size."&country=".$country."&apikey=your_musixmatch_api_key&&format=xml");
$soap = simplexml_load_string($data);
$i=0;
for($i=0;$i<$pg_size;$i++)
{
$artist=$soap->body->artist_list->artist[$i]->artist_name;
echo ($i+1).". "."<span class=\"h\">".$artist."</span>"."<br><br>";
}
}
if(!empty($_GET["nartist"]))
{
$a=$_GET["country"];
$b=$_GET["nartist"];
if($b<=0 || $b>100)
echo "<span class=\"error\">"."Error! Tracks should be in the range 0-100."."</span>";
if($b>0 && $b<=100)
$data=get_artist($a,$b);
}
else
if(isset($_GET['go']))
echo "<span class=\"error\">"."Error! Please enter all the details."."</span>";
?>
</body>
<div class="footerholder">
<div class="footer">
Find Vinayak on   <a style="color:#505050" href="https://www.facebook.com/profile.php?id=100002222005081" title="Vinayak's Facebook" target=_blank> <img border="0" alt="Vinayak's Facebook" src="fb.png" width="20px" height="20px"></a>   <a style="color:#505050" href="https://www.github.com/Vinnu1" title="Vinayak's GitHub" target=_blank> <img border="0" alt="Vinayak's GitHub" src="gh.png" width="20px" height="20px"></a>
  |   Find Deepansh on   <a style="color:#505050" href="https://www.facebook.com/DeepanshKhurana" title="Deepansh's Facebook" target=_blank> <img border="0" alt="Deepansh's Facebook" src="fb.png" width="20px" height="20px"></a>   <a style="color:#505050" href="https://www.github.com/DeepanshKhurana" title="Deepansh's GitHub"target=_blank> <img border="0" alt="Deepansh's GitHub" src="gh.png" width="20px" height="20px"></a>
</div>
</div>
</html>