-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathskip.php
More file actions
30 lines (19 loc) · 730 Bytes
/
skip.php
File metadata and controls
30 lines (19 loc) · 730 Bytes
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
<?php
if (!function_exists("getallheaders")) {
// getallheaders is required to get the Authorization header as it does not appear
// in $_SERVER or anywhere else. Therefore, try updating all of your software -
// web server, PHP, etc. and try again.
// This works absolutely fine on Apache and PHP 7.
http_response_code("501 Not Implemented");
error_log("https://github.com/WilliamVenner/LaMetric-Spotify/issues/2#issuecomment-325140347");
return;
}
$headers = getallheaders();
if (!isset($headers["Authorization"])) {
return;
}
$auth = $headers["Authorization"];
require("inc/api.php");
$Spotify = new Spotify($auth);
$Spotify -> API("me/player/next", true);
?>