Example #1
0
function getMobileurl($url)
{
    $data = getvideoid($url);
    if (strpos($url, 'youku.com')) {
        $Mobileurl = 'http://m.youku.com/wap/pvs?id=' . $data['id'] . '&format=3gphd->video/mp4';
        return $Mobileurl;
    } elseif (strpos($url, 'tudou.com')) {
        if ($data['type'] == 'youku') {
            $Mobileurl = 'http://m.youku.com/wap/pvs?id=' . $data['id'] . '&format=3gphd->video/mp4';
            return $Mobileurl;
        } else {
            $Mobileurl = 'http://vr.tudou.com/v2proxy/v2.m3u8?it=' . $data['id'] . '&st=2&pw=->video/mp4';
            return $Mobileurl;
        }
    } else {
        return null;
    }
}
Example #2
0
        include_once './Common/vids.php';
        $data = getvideoid($url);
        $id = $data['id'];
        $type = $data['type'];
    }
} else {
    if (isset($_GET['vtype'])) {
        $type = $_GET['vtype'];
        $id = $_GET['vid'];
    } elseif (isset($_GET['u'])) {
        $ids = base64_decode($_GET['u']);
        if (preg_match("/^[a-zA-Z0-9-_]{4,41}\\.[a-z0-9]{2,12}\$/", $url)) {
            list($id, $type) = explode('.', $ids);
        } else {
            include_once './Common/vids.php';
            $data = getvideoid($url);
            if ($data['status'] < 0) {
                echo '无法识别的url';
                die;
            }
        }
    }
}
if (isset($type)) {
    if ($type) {
        $type = ucfirst(strtolower($type));
        $filename = './Models/' . $type . 'Model.php';
        if (file_exists($filename)) {
            include_once $filename;
        } else {
            include_once './Models/UrlModel.php';
Example #3
0
         $extref = array();
     } else {
         $extref = explode('~~', $extref);
     }
     $newextref = array();
     for ($i = 0; $i < count($extref); $i++) {
         if (!isset($_POST["delhelp-{$i}"])) {
             $newextref[] = $extref[$i];
         }
     }
 } else {
     $newextref = array();
 }
 //DO we need to add a checkbox or something for updating this if captions are added later?
 if ($_POST['helpurl'] != '') {
     $vidid = getvideoid($_POST['helpurl']);
     if ($vidid == '') {
         $captioned = 0;
     } else {
         $ctx = stream_context_create(array('http' => array('timeout' => 1)));
         $t = @file_get_contents('http://video.google.com/timedtext?lang=en&v=' . $vidid, false, $ctx);
         $captioned = $t == '' ? 0 : 1;
     }
     $newextref[] = $_POST['helptype'] . '!!' . $_POST['helpurl'] . '!!' . $captioned;
 }
 $extref = implode('~~', $newextref);
 if (isset($_POST['doreplaceby'])) {
     $replaceby = intval($_POST['replaceby']);
 } else {
     $replaceby = 0;
 }