Example #1
0
        }
    } else {
        if (b64UrlCheck($url) == true) {
            $url = strpos(base64_decode($url), '://') ? base64_decode($url) : 'http://' . base64_decode($url);
        } else {
            header("Content-Type: text/html;charset=utf-8");
            echo '对不起!我们暂时不提供该网站的解析.' . die;
        }
    }
    $host = parse_url($url, PHP_URL_HOST);
    $array = array_slice(explode(".", $host), -2, 1);
    $video['videourl'] = $url;
    $video['videotype'] = $type = strtolower($array[0]);
}
if (!empty($key) && !empty($type) || !empty($url)) {
    if (kms_strpos($url, explode(',', $_config['Passage']))) {
        $video['data'][0]['src'] = $url;
    } else {
        if (!empty($type)) {
            if (empty($video['videotype'])) {
                $video['videotype'] = $type;
            }
            $_extractorFile = './resource/key/ID_' . strtoupper($type) . '.php';
            if (file_exists($_extractorFile)) {
                include_once $_extractorFile;
            }
        }
        if (!empty($url) && function_exists('GetVid') && empty($key)) {
            $key = GetVid($url);
        }
        if (!empty($key) && function_exists('GetUrls')) {
Example #2
0
function antiCheck($config)
{
    if (!empty($config['IO'])) {
        @($refer = $_SERVER['HTTP_REFERER']);
        if (!empty($refer)) {
            $Access = 0;
            //黑名单
            $Blacklist = explode(',', $config['Blacklist']);
            //白名单
            $Whitelist = explode(',', $config['Whitelist']);
            //如果白名单不为空
            if (!empty($config['Whitelist'])) {
                if (kms_strpos($refer, $Whitelist) === true) {
                    $Access = 1;
                }
            }
            if (!empty($config['Blacklist'])) {
                if (kms_strpos($refer, $Blacklist) === true) {
                    $Access = 0;
                }
            }
        }
        if (empty($Access)) {
            if (!empty($config['Url']) && isset($config['Time'])) {
                header('Refresh: ' . $config['Time'] . '; url=' . $config['Url']);
                exit($config['TexT']);
            }
        }
    }
}