Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
youshandefeiyang authored Jan 17, 2024
1 parent 857dde3 commit 276ec00
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions PHP/douyu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
$id = $_GET['id'] ?? "9249162";
$apiUrl = 'https://wxapp.douyucdn.cn/api/nc/stream/roomPlayer';
$postData = "room_id=$id&big_ct=cph-androidmpro&did=10000000000000000000000000001501&mt=2&rate=0";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$apiUrl);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$result = curl_exec($ch);
curl_close($ch);
$json = json_decode($result);
$mediaUrl = $json->data->live_url;
header('location:'.$mediaUrl);
?>

0 comments on commit 276ec00

Please sign in to comment.