Beispiel #1
0
function getDURLbyU_m($url, $q_list)
{
    $str = get_net_data($url);
    if (hasBadKey($str)) {
        return array("no", "Garbage", "Garbage", "Garbage", "0", "0");
    }
    $tit = stristr($str, "<title>");
    $p2 = strpos($tit, "</title>");
    $tit = substr($tit, 8, $p2 - 8);
    $tit = stristr($tit, "-");
    $tit = substr($tit, 2);
    $temp1 = 'description" content="';
    $des = stristr($str, $temp1);
    $des = substr($des, strlen($temp1));
    $p2 = strpos($des, '">');
    $des = substr($des, 0, $p2);
    $des2 = "";
    /*
    	$des2 = stristr($str,'class="watch-video-desc description"');
    	$p2 = strpos($des2,'</div>');
    	$des2 = substr($des2,0,$p2);
    	$des2 = stristr($des2,'<span');*/
    $theU = "";
    @($theU = getDURL(fmt_url_map(getArgDataFromStr($str)), $q_list));
    return array($theU, $tit, $des, $des2, "0", "0");
}
Beispiel #2
0
        curl_close($ch);
    }
    return $file_contents;
}
$empty = '<transcript></transcript>';
if (!isset($_GET['id'])) {
    die($empty);
}
if (!isset($_GET['lang'])) {
    die($empty);
}
include_once "gfw.php";
initGFW('mglib.txt');
$url = 'http://video.google.com/timedtext?hl=zh&type=track&lang=' . $_GET['lang'] . '&name=' . urlencode($_GET['name']) . '&v=' . $_GET['id'];
if (isset($_GET["tlang"])) {
    $url .= "&tlang=" . $_GET["tlang"];
}
echo '<!-- ' . $url . ' -->';
$out = get_net_data($url);
if (strlen($out) < 10) {
    die($empty);
}
if (strpos($out, '<title>404 Not Found</title>') > 5) {
    die($empty);
}
if (hasBadKey($out)) {
    die($empty);
}
$out = str_replace("&amp;", "&", $out);
print $out;
die(ob_get_contents());
Beispiel #3
0
@($rating = $r1['average']);
$a = ' -->
<?xml version="1.0" encoding="utf-8"?>';
$a .= '<ngsyvideo>
<id>' . $id . '</id>
<title>' . $xml->title . '</title>
<author>' . $author . '</author>
<image>' . $thumbnail . '</image>
<rating>' . $rating . '</rating>
<length>' . $length . '</length><!-- 单位为秒(s) -->
<quality>';
include 'nglib.php';
foreach (getVList($id) as $t_num1 => $t_url) {
    $t_num = substr($t_num1, 1);
    $a .= '<qitem id="' . $t_num . '" description="' . $QualityList[$t_num] . '">' . $t_url . '</qitem>';
}
$a .= '</quality>';
$ccurl = get_one_arg_data($str, 'ttsurl');
$cc = get_net_data($ccurl . '&type=list&tlangs=1&asrs=1&hl=zh&v=' . $id);
if (strlen($cc) > 2) {
    $a .= $cc;
    print $cc;
} else {
    $a .= '<transcript_list/>';
    print '<transcript_list/>';
}
print '<laobubu>';
$a .= '<ccurl>' . strstr($ccurl, "timedtext?") . '</ccurl>
</ngsyvideo>';
die($a);
flush();
Beispiel #4
0
ob_start();
echo $media->group->category;
$category_id = ob_get_contents();
ob_end_clean();
$author = $xml->author->uri;
$author = substr(strstr($author, 'users/'), 6);
$publishTime = date("Y-m-d H:i:s", strtotime($xml->published));
$updateTime = date("Y-m-d H:i:s", strtotime($xml->updated));
@($r1 = $xml->children('http://schemas.google.com/g/2005')->rating->attributes());
@($rating = $r1['average']);
@($raters = $r1['numRaters']);
@($s1 = $xml->children('http://gdata.youtube.com/schemas/2007')->statistics->attributes());
@($viewcount = $s1['viewCount']);
@($favoritecount = $s1['favoriteCount']);
$qualitylist = array();
foreach (getVList($ID, array()) as $x => $y) {
    $qualitylist[] = substr($x, 1);
}
if (count($qualitylist) < 2) {
    header('location: fixer.php');
    die('<a href="fixer.php">FIX ERROR</a>');
}
$str_page = get_net_data("http://www.youtube.com/watch?v=" . $ID);
if (strpos($str_page, 'watch-extra-info-left') != false) {
    //Check if there is Extra info
    $extrainfomation = strstr($str_page, "watch-extra-info-left");
    $extrainfomation = strstr($extrainfomation, ">");
    $extrainfomation = substr($extrainfomation, 0, strpos($extrainfomation, '</span'));
    $extrainfomation = strip_tags($extrainfomation);
}
include THEME_PATH . "/watch.php";
Beispiel #5
0
$file_path = str_replace("yx_x", "ytimg", $file_path);
header('location: https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?url=' . $file_path . '&container=focus&gadget=a&no_expand=1&resize_h=0&rewriteMime=image%2F*');
exit;
function get_net_data($url)
{
    if (!function_exists("curl_init")) {
        $file_contents = file_get_contents($url);
    } else {
        $ch = curl_init();
        $timeout = 5;
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
        $file_contents = curl_exec($ch);
        curl_close($ch);
    }
    return $file_contents;
}
$file_path = $_SERVER['QUERY_STRING'];
if (strlen($file_path) > 5) {
    $file_path = str_replace("|", "/", $file_path);
    $file_path = str_replace("yx_x", "ytimg", $file_path);
    $file_name = basename($file_path);
    header('Content-Type: image/jpeg');
    header("Content-Disposition:filename={$file_name}");
    echo get_net_data($file_path);
    exit;
} else {
    echo "ErrLen!";
}