Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ch = curl_init();
- $timeout = 10;
- curl_setopt ($ch, CURLOPT_URL, 'https://ytapi.radio.cn/ytsrv/srv/interactive/program/list');
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- $headers = [
- 'Content-Type: application/x-www-form-urlencoded',
- 'equipmentsource: WEB',
- ];
- curl_setopt($ch, CURLOPT_POSTFIELDS, "startdate=2021-09-10&enddate=2021-09-10&appKey=&broadCastId=747");
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $file_contents = curl_exec($ch);
- curl_close($ch);
- $result_array = json_decode($file_contents,true);
- $play_url = $result_array["broadcastPlayUrlHighMp3"];
- header("Location:$play_url",true, 302);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement