快手抖音-随机播放+视频解析+列表更新

2020-07-03  阅读 538 次

快手小姐姐随机播放,带视频源库,播放列表长期更新,php空间即可,无需数据库,视频源在ks.txt(一万多个)

雅爱笔记_www.5devip.com

index.html 代码

<!DOCTYPE html>
<html>
<head>
    <meta charSet="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Cache-Control" content="no-transform" /> 
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="referrer" content="never">
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>快手小姐姐在线播放</title>
    <style type="text/css">
* {
    border: 0;
    margin: 0;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

body {
    background: #000;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}


#main {
    height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
}

#player {
    width: 100%;
    height: auto;
    max-height: 100%;
}

#buttons {
    height: 60px;
    padding: 10px;
}

#switch,
#next {
    background: #FFF;
    background: linear-gradient(to bottom, #FF2,#FB0);
    color: #AF2E08;
    font-size: 16px;
    font-weight: bold;
    height: 40px;
    padding: 0px 20px;
    margin: 0px 5px;
    border-radius: 20px;
}
    </style>
</head>
<body>
    <section id="main">
        <video id="player" src="video.php" controls webkit-playsinline playsinline></video>
    </section>
    <section id="buttons">
        <button id="switch">连续: 开</button>
        <button id="next">播放下一个</button>
    </section>
    <script>
    (function (window, document) {
        if (top != self) {
            window.top.location.replace(self.location.href);
        }
        var get = function (id) {
            return document.getElementById(id);
        }
        var bind = function (element, event, callback) {
            return element.addEventListener(event, callback);
        }
        var auto = true;
        var player = get('player');
        var randomm = function () {
            player.src = 'video.php?_t=' + Math.random();
            player.play();
        }
        bind(get('next'), 'click', randomm);
        bind(player, 'error', function () {
            randomm();
        });
        bind(get('switch'), 'click', function () {
            auto = !auto;
            this.innerText = '连续: ' + (auto ? '开' : '关');
        });
        bind(player, 'ended', function () {
            if (auto) randomm();
        });
    })(window, document);
    </script>
</body>
</html>

video.php 代码

<?php
/*雅爱笔记收集整理www.5devip.com*/
function read(...$filelist) {
    $list = [];
    foreach ($filelist as $file) {
        $handle = fopen($file, 'r');
        while (($line = fgets($handle)) !== false) {
            array_push($list, trim($line));
        }
        fclose($handle);
    }
    return $list;
}

$list = read('ks.txt');
$url = $list[array_rand($list)];

header("Location: {$url}");

ks.txt 文件,由于太多,请到下面下载

http://ali-cdn.kwai.net/upic/2015/10/12/10/BMjAxNTEwMTIxMDIzMTlfMTY3ODUwOTFfNDEzMTgzNDY5XzJfMw==.mp4
http://ali-cdn.kwai.net/upic/2016/06/25/11/BMjAxNjA2MjUxMTQ2MzRfMTQ0MTUyNDU1Xzg0MTYzNTMwOV8xXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/06/26/19/BMjAxNjA2MjYxOTA0NDJfMTY3ODUwOTFfODQ1Mjg5MDUxXzJfMw==.mp4
http://ali-cdn.kwai.net/upic/2016/07/04/20/BMjAxNjA3MDQyMDI2MTFfMjI2MzMzNTA2Xzg2NTIzMzI1OF8yXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/07/16/18/BMjAxNjA3MTYxODAzMTNfMTY3Mjc0OTkwXzg5NjMzNjAyNV8yXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/07/22/21/BMjAxNjA3MjIyMTMyNDlfMTQ0MTUyNDU1XzkxMzAyNDM5MV8xXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/07/28/21/BMjAxNjA3MjgyMTIwNTFfMTQ0MTUyNDU1XzkyODk4NDIyMF8xXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/08/10/19/BMjAxNjA4MTAxOTMzMDNfMTQ0MTUyNDU1Xzk2NTMzNTI2MV8xXzM=.mp4
http://ali-cdn.kwai.net/upic/2016/09/08/14/BMjAxNjA5MDgxNDA0MDBfMTMzMDkxODc4XzEwNDQzNTkxMDFfMV8z.mp4
http://ali-cdn.kwai.net/upic/2016/09/13/23/BMjAxNjA5MTMyMzIxMDVfMTQ0MTUyNDU1XzEwNTk2MTQyNThfMV8z.mp4
http://ali-cdn.kwai.net/upic/2016/09/17/00/BMjAxNjA5MTcwMDE0MTRfMTQ0MTUyNDU1XzEwNjk1MjQxMzdfMV8z.mp4

..................

演示地址:点击查看

本文地址:https://yaaibk.com/post/149.html
温馨提示:文章内容系作者个人观点,不代表雅爱博客对观点赞同或支持。
版权声明:本文为  转载  文章,来源于 点击这里 ,版权归原作者所有,欢迎分享本文,转载请保留出处!

评论已关闭!