I tried to find a lot of information on the Internet, but now the problem is how to generate live by using the parameter values in the interface address parameters. qq. comswf_apiro... this is because the interface address changes every time the t and sign parameters are refreshed. how can I obtain the parameters here or generate my... I have tried a lot of materials on the Internet, but the problem is how to generate the parameter values in the interface address parameters.
Http://live.qq.com/swf_api/ro...
This is because the interface address changes every time the t and sign parameters are refreshed. how can I obtain the parameters here or generate
I previously found an error in the address access interface generated by changing the Python language to PHP.
function getmd5($str){ $m=md5($str); return $m;}function l_request($action){ $baseUrl = "http://www.douyutv.com/api/v1/room/"; $midReq = "?aid=android&cdn=ws&client_sys=android&time="; $t=time(); $md5_url= $action . $t . 1231; //$auth = getmd5($md5_url); $requrl= $baseUrl . $action . $midReq . $t . "&auth=" . getmd5($md5_url); return $requrl;}echo (l_request(10000346));
Reply content:
I have tried a lot of materials on the Internet, but the problem is how to generate the parameter values in the interface address parameters.
Http://live.qq.com/swf_api/ro...
This is because the interface address changes every time the t and sign parameters are refreshed. how can I obtain the parameters here or generate
I previously found an error in the address access interface generated by changing the Python language to PHP.
function getmd5($str){ $m=md5($str); return $m;}function l_request($action){ $baseUrl = "http://www.douyutv.com/api/v1/room/"; $midReq = "?aid=android&cdn=ws&client_sys=android&time="; $t=time(); $md5_url= $action . $t . 1231; //$auth = getmd5($md5_url); $requrl= $baseUrl . $action . $midReq . $t . "&auth=" . getmd5($md5_url); return $requrl;}echo (l_request(10000346));
Https://github.com/soimort/yo...
This is the python version.
Php:
'Ws ', 'rate' => '0', 'TT' => $ tt, 'did' => $ did, 'sign' => $ sign]; $ api_url = "http://www.douyu.com/lapi/live/getPlay ". $ room_id; $ api_data = curl ($ api_url, 'post', http_build_query ($ d); $ api_data = json_decode ($ api_data, 1 ); // print_r ($ api_data); if ($ api_data ['error'] = 0) {echo 'live stream address :'. $ api_data ['data'] ['rtmp _ url']. '/'. $ api_data ['data'] ['rtmp _ Live'];} else {echo 'api request error ';}