music.php 587 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. header("Content-Type: application/json");
  3. chdir("../../");
  4. include "lib/frontend.php";
  5. $frontend = new frontend();
  6. /*
  7. Captcha
  8. */
  9. $null = null;
  10. include "lib/captcha_gen.php";
  11. new captcha($null, $null, $null, $null, false);
  12. [$scraper, $filters] = $frontend->getscraperfilters(
  13. "music",
  14. isset($_GET["scraper"]) ? $_GET["scraper"] : null
  15. );
  16. $get = $frontend->parsegetfilters($_GET, $filters);
  17. try{
  18. echo json_encode(
  19. $scraper->music($get),
  20. JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
  21. );
  22. }catch(Exception $e){
  23. echo json_encode(["status" => $e->getMessage()]);
  24. }