http://api.polyv.net/live/v3/channel/session/simple-list
{
"code":200,
"status":"success",
"message":"",
"data":[
{
"sessionId":"fmwuubgojd",
"channelId":1362350,
"channelAccount":null,
"liveType":"alone",
"streamName":"4d57ea01de1587722394602020e",
"createdTime":1588038557000,
"lastModified":1588038557000,
"pushClient":"mac"
},
{
"sessionId":"fmsv7rte20",
"channelId":1362350,
"channelAccount":null,
"liveType":"alone",
"streamName":"4d57ea01de1587722394602020e",
"createdTime":1587725914000,
"lastModified":1587725914000,
"pushClient":"mac"
},
{
"sessionId":"fmsutw2fn5",
"channelId":1362350,
"channelAccount":null,
"liveType":"alone",
"streamName":"4d57ea01de1587722394602020e",
"createdTime":1587725075000,
"lastModified":1587725075000,
"pushClient":"mac"
}
]
}
{
"code": 400,
"status": "error",
"message": "appId is required.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "application not found.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "invalid timestamp.",
"data": ""
}
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
<?php
//引用config.php
include 'config.php';
$type = "mic";
$params = array(
'appId'=>$appId,
'channelId'=>$channelId,
'start'=>$start,
'end'=>$end,
'timestamp'=>$timestamp
);
//生成sign
$sign = getSign($params); //详细查看config.php文件
$params['sign'] = $sign;
$url="http://api.polyv.net/live/v3/channel/session/simple-list?".http_build_query($params);
echo "<script>window.location.href='$url'</script>";
?>