Exemple #1
0
<?php

include 'local/language.php';
include_once 'lib/mq.php';
include_once "lib/apirequest.php";
initGFW('lib/mglib.txt');
$pageTitle = WEBSITE_TITLE;
$pageHideLeft = 0;
$pageHideRight = 0;
include THEME_PATH . "/header.php";
include THEME_PATH . '/mini_gallery.php';
function ShowVideoGallery($dataid, $time = "", $local = "-")
{
    $url = ytapi . 'standardfeeds/';
    if ($local == "-") {
        $url .= ytpos;
    } else {
        if (strlen($local) > 0) {
            $url .= $local . '/';
        }
    }
    $url .= $dataid;
    if (strlen($time) > 0) {
        $url .= "?time=" . $time;
    }
    $xml = xml_load2($url);
    if ($xml != NULL) {
        vg_head();
        foreach ($xml->entry as $entry) {
            $media = $entry->children('http://search.yahoo.com/mrss/');
            ob_start();
Exemple #2
0
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");
        $file_contents = curl_exec($ch);
        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);
}