本帖最后由 jiteloozz 于 2023-9-16 18:11 编辑
在线直播随机看,发这个意义不大,意在PHP的积累思考交流。
- <?php
- header('Content-Type:text/json;charset=UTF-8');
- $url='https://cryolite.memeyule.com/api/v8/homes/info?page=1&size=21';
- $data=file_get_contents($url);
- $json=json_decode($data);
- $ments=array(
- 'dancer','singer','appearance','dating'
- );
- $info=$ments[array_rand($ments,1)];
- foreach ($json->data->core_requirements->{$info} as $stream){
- $ids[]=$stream->id;
- }
- $sid=$ids[array_rand($ids,1)];
- $playurl='https://pull-aliyun.memeyule.com/memeyuleNew/'.$sid.'.m3u8';
- header('location:'.$playurl);
复制代码
发帖注意事项
请勿胡乱发帖:https://www.right.com.cn/forum/thread-8307840-1-1.html
账户手机验证:https://www.right.com.cn/forum/home.php?mod=spacecp&ac=plugin&id=jzsjiale_sms:home
|