audio.php 437 B

12345678910111213
  1. <?php
  2. $ch = curl_init("https://t4.bcbits.com/stream/" . urlencode($_GET["directory"]) . "/" . urlencode($_GET["format"]) . "/" . urlencode($_GET["file"]) . "?token=" . urlencode($_GET["token"]));
  3. curl_setopt($ch, CURLOPT_WRITEFUNCTION, function($ch, $data) {
  4. echo $data;
  5. return strlen($data);
  6. });
  7. $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
  8. header("Content-Type: " . $contentType);
  9. curl_exec($ch);
  10. ?>