Beispiel #1
0
            $f = 'super2';
        } else {
            if ($f == 9) {
                $f = 'real';
            } else {
                $f = 'normal';
            }
        }
    }
}
$page = getsite('http://www.flvcd.com/parse.php?kw=http://v.youku.com/v_show/id_' . $url . '.html&flag=one&format=' . $f);
$video = getbody($page, '<strong>当前解析视频', '<br>花费时间', 1);
$videos = explode('</a>', $video);
$video = '';
for ($i = 0; $i < count($videos); ++$i) {
    $tmp = getbody($videos[$i], 'href="', '"', 1);
    if (!empty($tmp)) {
        $i > 0 && ($video .= '|');
        $video .= $tmp;
    }
}
echo $video;
exit;
//(!empty($video)) && @header("location:".$video);
function getsite($url)
{
    $buf = parse_url($url);
    if ($buf["scheme"] == "http") {
        $host = $buf["host"];
        $page = $buf["path"];
        if (trim($buf["query"]) !== "") {
Beispiel #2
0
function yk_list_begin($vid)
{
    $url = API . $vid . APP;
    $ur = API . $vid;
    $bhtml = getbody($ur);
    $bjson = json_decode($bhtml);
    $bdata = $bjson->data[0];
    $html = getbody($url);
    $json = json_decode($html);
    $data = $json->data[0];
    $second = $data->seconds;
    $fileids = $data->streamfileids;
    if (property_exists($fileids, 'mp4')) {
        $format = 'mp4';
    } else {
        $format = 'flv';
    }
    $fileid = $fileids->{$format};
    $segs = $data->segs->{$format};
    $bsegs = $bdata->segs->{$format};
    $bytes = $data->streamsizes->{$format};
    $fileid = yk_file_id($fileid, $data->seed);
    $fileid_1 = substr($fileid, 0, 8);
    $fileid_2 = substr($fileid, 10);
    list($sid, $token) = explode('_', yk_e('becaf9be', yk_na($data->ep)));
    $xmls = '<m starttype="0" label="" type="2" bytes="' . $bytes . '" duration="' . $second . '" bg_video="{xywh:[0,0,100P,100P]}">' . '
';
    $xml = '';
    foreach ($segs as $k => $v) {
        $hex = strtoupper(dechex($k)) . '';
        if (strlen($hex) < 2) {
            $hex = '0' . $hex;
        }
        $fileid = $fileid_1 . $hex . $fileid_2;
        $key = $v->k;
        if (!$key || $key == '' || $key == '-1') {
            $key = $bsegs[$k]->k;
        }
        $ep = urlencode(iconv('gbk', 'UTF-8', yk_d(yk_e('bf7e5f01', $sid . '_' . $fileid . '_' . $token))));
        $tvaddr = KUR . $sid . '_00/st/' . $format . '/fileid/' . $fileid . '?K=' . $key . '&hd=1&myp=0&ts=';
        $tvaddr .= $v->seconds . '&ypp=0&ctype=12&ev=1&token=' . $token . '&oip=' . $data->ip . '&ep=' . $ep;
        $xml .= '<u bytes="' . $v->size . '" duration="' . $v->seconds . '" src="' . $tvaddr . '" label="' . $k . '" />' . '
';
    }
    if ($xml !== '') {
        header('Content-type:text/xml;charset=utf-8');
        return $xmls . $xml . '</m>';
    }
}