diff options
author | Minteck <contact@minteck.org> | 2022-07-19 21:19:59 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-07-19 21:19:59 +0200 |
commit | 735d518ae6ecc6c8d0ecbbae4aa3c019151178fc (patch) | |
tree | 341ee0e7faa7b6f3367b9a4e129cbd148006158c /api | |
parent | 3d71c572ec9a0827071be1978731079e8f1e5dbf (diff) | |
download | argon-trunk.tar.gz argon-trunk.tar.bz2 argon-trunk.zip |
Diffstat (limited to 'api')
-rw-r--r-- | api/get_song_cover.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/api/get_song_cover.php b/api/get_song_cover.php new file mode 100644 index 0000000..b6fc53c --- /dev/null +++ b/api/get_song_cover.php @@ -0,0 +1,28 @@ +<?php + +if (isset($_GET["_"])) { + $f = $_GET["_"]; +} else { + die(); +} + +header("Content-Type: application/json"); + +$ua = str_replace("+", "_", str_replace("/", "-", base64_encode(substr($_SERVER["HTTP_USER_AGENT"], 0, 200)))); +$ip = str_replace("+", "_", str_replace("/", "-", base64_encode(substr($_SERVER["REMOTE_ADDR"], 0, 48)))); + +$out = [ + "original" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/original/$ua/$ip"), + "originalpcm" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/originalpcm/$ua/$ip"), + "ultrahigh" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/ultrahigh/$ua/$ip"), + "ultrahighpcm" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/ultrahighpcm/$ua/$ip"), + "veryhigh" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/veryhigh/$ua/$ip"), + "high" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/high/$ua/$ip"), + "medium" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/medium/$ua/$ip"), + "low" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/low/$ua/$ip"), + "verylow" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/verylow/$ua/$ip"), + "ultralow" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/ultralow/$ua/$ip"), + "superlow" => "https://mediacdn.argon.minteck.org" . file_get_contents("http://192.168.1.51:8875/authorize/$f/superlow/$ua/$ip"), +]; + +die(json_encode($out, JSON_PRETTY_PRINT));
\ No newline at end of file |