function get_playlist_byid($id) { $params['client_id'] = "f1652f5ab2517d4d"; $params['playlist_id'] = $id; $params['count'] = 100; $base_url = "https://openapi.youku.com/v2/playlists/videos.json"; $url = $base_url . "?" . http_build_query($params); $s = file_data($url); $result = json_decode($s, true); $video = $result['videos']; if (empty($video)) { return false; } $result['videoname'] = array(); $result['videolink'] = array(); $result['videoimg'] = array(); $result['videotime'] = array(); foreach ($video as $vk => $vv) { //http://player.56.com/cpm_MTA4NzEzNDUz.swf $result['videoname'][$vk] = diconv($vv['title'], "utf-8"); $result['videolink'][$vk] = 'http://player.youku.com/player.php/Type/Folder/Fid/19466264/Ob/1/sid/' . $vv['id'] . '/v.swf'; $result['videoimg'][$vk] = $vv['thumbnail']; $result['videotime'][$vk] = strtotime($vv['published']); } unset($result['videos']); return $result; }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { if (preg_match("/^\\d+\$/iUs", $id)) { $interface = file_data('http://v.pps.tv/ugc/ajax/aj_newlongvideo.php?sid=' . $id . '&type=splay'); $obj = json_decode($interface); $content = $obj->content[0]; $xml = ""; foreach ($content as $value) { //$d_echo = $value->d_echo; if (!empty($value->url_key)) { $vName = $content[0]->title; $lists = $this->single($value->url_key); $xml .= $lists["xml"]; } else { //echo $value[0]->title; preg_match("/.*?-(.*?)/iUs", $value[0]->title, $arr); $vName = $arr[1]; foreach ($value as $v) { $lists = $this->single($v->url_key); $xml .= $lists["xml"]; } } } } else { $interface = $this->single($id); $xml = $interface["xml"]; $vName = $interface["vName"]; } return array("xml" => "<list>\n" . $xml . '</list>', "lists" => $xml, "vName" => $vName); }
/** * 加载页面 */ public function url() { if (!IS_GET) { $this->error("页面不存在!"); } echo file_data(Q("get.url")); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { $t_id = array(substr($id, 0, 1), substr($id, 1, 1)); $page = file_data("http://Auto.m1905.com/profile/vod/" . $t_id[0] . "/" . $t_id[1] . "/" . $id . "_1.xml"); preg_match('/<playlist.*title="(.*)".*<item.*url="(.*)".*<\\/playlist>/iUs', $page, $arr); $xml = '<m type="" src="' . $arr[2] . '?start={start_seconds}" stream="true" label="' . $arr[1] . "\" />\n"; return array("xml" => "<list>\n" . $xml . "</list>", "lists" => $xml, "vName" => $arr[1]); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { preg_match("/lk\\/([0-9A-Za-z]{13})/iUs", $id, $ids); $page = file_data($id); preg_match("/name : '(.*)\\.flv|\\.mp4?',/iUs", $page, $arr); $vName = $arr[1]; $xml = '<m type="" src="' . U("Data/Yunio/proxy", array("id" => $ids[1])) . '" label="' . $vName . "\" />\n"; return array("xml" => "<list>\n" . $xml . "</list>", "vName" => $vName); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { $page = file_data("http://v.yinyuetai.com/video/" . $id); preg_match("/hcvideoUrl.*'(http:\\/\\/.*\\.flv\\?sc=\\w+)&.*',/iUs", $page, $arr); preg_match('/title\\s*:\\s*"(.*)",/iUs', $page, $ar); $vName = explode(" ", $ar[1])[0]; $xml = "<m type=\"\" src=\"" . $arr[1] . "\" stream=\"true\" label='" . $vName . "' />\n"; return array("lists" => $xml, "xml" => "<list>\n" . $xml . '</list>', "vName" => $vName); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { $page = file_data($id); preg_match("/name : '(.*)\\.flv|\\.mp4?',/iUs", $page, $arr); $vName = $arr[1]; $flv = preg_replace("/(yunpan)\\/(id)\\/(.*)\\.html/iUs", "\\1?\\2=\\3", U("Data/Sanliuling/yunpan", array("id" => $id))); $xml = '<m type="" src="' . $flv . '" label="' . $vName . "\" />\n"; return array("xml" => "<list>\n" . $xml . "</list>", "vName" => $vName); }
/** * 获得列表 * @param int $id ID号 * @return string 返回列表 */ public function listpage($id) { $page = file_data('http://www.400gb.com/file/' . $id); preg_match('/<a class="btn btn-purple" target="_blank" href="(.*)">在线播放<\\/a>/iUs', $page, $arr); $play = file_data('http://www.400gb.com' . $arr[1]); preg_match('/<h1>(.*)<small>.*<\\/small><\\/h1>.*file: "(.*)",/iUs', $play, $arr); $vName = preg_replace('/(?:\\.flv)|(?:\\.mp4)/iUs', "", $arr[1]); $xml = '<m type="2" src="' . $arr[2] . '&start={start_bytes}" stream="true" label="' . $vName . "\" />\n"; return array("xml" => "<list>\n" . $xml . "</list>", "vName" => $vName); }
/** * 单个执行 * @param string $id 影片ID * @return [type] [description] */ public function listpage($id) { $page = file_data($id); preg_match('/server_filename="(.*)";/iUs', $page, $arr); $share = strpos($url, 'shareid='); if ($share > 0) { $id = str_replace('&uk=', '/', substr($url, $share + 8)); } else { $id = substr($url, 24); } $xml = '<m type="2" src="' . U("wangpan", array($id)) . '" label="' . $vName . "\" />\n"; return array("xml" => $xml, "vName" => $vName); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id, $name = "") { $page = file_data('http://www.letv.com/ptv/vplay/' . $id . '.html'); preg_match('/<!-- 剧集列表 start -->.*<script type="text\\/javascript">var\\s+\\w+\\s*=\\s*(.*)\\s*;<\\/script>/iUs', $page, $arr); $json = json_decode($arr[1]); $vName = $name; $xml = ""; /*$articulation = array( "350" => "极速", "1000" => "标清", "1300" => "高清", "720p" => "超清", "1080p" => "1080p" );*/ $stime = 'http://api.letv.com/time?tn=0.' . time(); $str = file_data($stime); $obj = json_decode($str); $t = $obj->stime; for ($a, $i = 0; $i < 8; $i++) { $a = 1 & $t; $t >>= 1; $a <<= 31; $t += $a; } $key = $t ^ 185025305; foreach ($json as $value) { $vid = $value->vid; $interface = file_data('http://api.letv.com/mms/out/video/play?id=' . $vid . '&platid=1&splatid=101&domain=http://www.letv.com&tkey=' . $key); preg_match('/<playurl><!\\[cdata\\[(.*)\\]\\]><\\/playurl>/iUs', $interface, $data); $json = json_decode($data[1]); $name = $json->title; $dispatch = $json->dispatch; $flv = array(); foreach ($dispatch as $k => $v) { $flv[$k] = str_replace("tss=ios", "tss=no", $v[0]) . "&"; } $xml .= '<m type="" src="' . $flv["1000"] . 'start={start_bytes}" stream="true" label="' . $name . "\" />\n"; } return array("xml" => "<list>\n" . $xml . '</list>', "lists" => $xml, "vName" => $vName); }
/** * 生成列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { $page = file_data("http://www.funshion.com/subject/" . $id); preg_match('/window.minfo.webfsps = (.*);/imsU', $page, $info); $obj = json_decode($info[1]); $title = $obj->mp4->name_cn; $type = $obj->mp4->displaytype; if ($type == "tv") { $urls = $obj->mp4->fsps->mult; $xml = ""; foreach ($urls as $url) { $url = $url->url; $url = file_data('http://www.funshion.com' . $url); preg_match('/playinfo = (.*);/imsU', $url, $arr); $url = $arr[1]; $obj = json_decode($url); $label = $obj->mp4->description; $url = 'http://jobsfe.funshion.com/query/v1/mp4/' . $obj->mp4->hashid . '.json'; $url = file_data($url); $obj = json_decode($url); $xml .= '<m type="2" src="' . $obj->playlist[0]->urls[0] . '?start={start_bytes}" stream="true" label="' . $title . " " . $label . '"/>' . "\n"; } } elseif ($type == "movie") { $url = $obj->mp4->fsps->mult[0]; $url = $url->url; $url = file_data('http://www.funshion.com' . $url); preg_match('/playinfo = (.*);/imsU', $url, $arr); $url = $arr[1]; $obj = json_decode($url); $label = $obj->mp4->description; $url = 'http://jobsfe.funshion.com/query/v1/mp4/' . $obj->mp4->hashid . '.json'; $url = file_data($url); $obj = json_decode($url); $xml = '<m type="2" src="' . $obj->playlist[0]->urls[0] . '?start={start_bytes}" stream="true" label="' . $label . '"/>' . "\n"; } return array("xml" => "<list>\n" . $xml . "</list>", "lists" => $xml, "vName" => $title); }
/** * 生成一日节目列表 * @param string $name 节目名称 * @param string $date 播放日期 * @return string $x 播放列表 */ private function cctv_date($name, $date) { $xmlUrl = 'http://ipad.cntv.cn/nettv/2011jiemudan/xmldata/' . str_replace("-", "/", $date) . '/' . $name . '.xml'; $sim = simplexml_load_string(file_data($xmlUrl))->programsback->program; $name = explode("=", $sim->attributes()->url); $name = end($name); $x = "<list>\n"; $today = date("Y-m-d"); $hour = strtotime(date("H:i")); if ($date == $today) { $bool = true; } foreach ($sim as $si) { $atr = $si->attributes(); if ($bool) { if (strtotime($atr->showTime) > $hour) { break; } } $x .= '<m label="' . $atr->title . '-' . $atr->showTime . '" type="merge" src="' . U("Data/Live/huibo", array("channel" => $name, "playtime" => $atr->starttime . '-' . $atr->endtime)) . "\" />\n"; } $x .= '</list>'; return $x; }
/** * 找到XML数据 * @param string $vid 视频VID * @return [type] [description] */ private function pptv_vid($vid) { if (!is_numeric($vid)) { $vid = json_decode(file_data('http://api.v.pptv.com/api/openapi/player.open.json?id=' . $vid . '&from=0&version='))->data->pptv->id; } $xmlUrl = 'http://client-play.pplive.cn/chplay3-0-' . $vid . '.xml'; header("location:" . $xmlUrl); }
/** * 盗取列表 * @param string $url 要盗取列表的URL地址 * @return string 返回被盗取的列表及被替换后的URL地址 */ public function collect($url) { if (!$url) { $this->error("页面不存在"); } $yy = unescape($url); preg_match("/^(http:\\/\\/.*)\\/[0-9A-Za-z]+\\.swf.*lists=(.*\\.(?:xml|swf|txt))(?:\\&\\.swf)?/iUs", $yy, $arr); if (strpos("http://", $arr[2]) > -1) { $ur = $arr[2]; } else { $ur = $arr[1] . '/' . $arr[2]; } $xml = file_data($ur, array("gbk", "utf-8")); $yy_u = "[flash]http://afp.qiyi.com/main/c?db=qiyiafp&bid=1,1,1&cid=1,1,1&sid=0&url=http://player.qlyewu.com/cmp.swf?&url=config/6400.xml&lists=" . $ur . "&.swf|626|500[/flash]"; $yy_url = $yy_u . "\n\n" . $xml; return $yy_url; }
/** * 合并插件 */ public function merge() { if (!($id = Q("get.id"))) { $this->error("页面不存在!"); } //$md5 = "YUhSMGNEb3ZMM3B0Y0RRdVlXeHBZWEJ3TG1OdmJTOTVhMmhrTG5Cb2NEOTJhV1E5"; //超清 $md5 = "YUhSMGNEb3ZMM3B0Y0RRdVlXeHBZWEJ3TG1OdmJTOTVheTV3YUhBL2RtbGtQUT09"; //高清 //$md5 = "YUhSMGNEb3ZMM3B0Y0RRdVlXeHBZWEJ3TG1OdmJTOTVhM05rTG5Cb2NEOTJhV1E5"; //标清 $md5 = base64_decode(base64_decode($md5)); $src = '' . $md5 . '' . $id . ''; $str = file_data($src); $json = json_decode($str); $vidEncoded = $json->vidEncoded; $streamsizes = $json->streamsizes; $seconds = $json->seconds; $vlist = $json->vlist; $xml = '<m starttype="0" label="' . $vidEncoded . '" type="mp4" bytes="' . $streamsizes . '" duration="' . $seconds . '" bg_video="" lrc="">' . "\n"; foreach ($vlist as $value) { $xml .= '<u bytes="' . $value->size . '" duration="' . $value->seconds . '" src="' . $value->link . '" />' . "\n"; } $xml .= '</m>'; header('Content-type:text/xml;charset:utf-8;filename:优酷真实代理.xml'); echo $xml; }
/** * 生成列表 * @param string $sid 视频ID * @return array 视频列表及视频名称 */ public function listpage($sid, $single = 1) { $interface = file_data('http://hot.vrs.sohu.com/pl/videolist?playlistid=' . $sid); // 采集接口 $obj = json_decode(preg_replace('/,\\s*(\\]})/iUs', '\\1', iconv("gbk", "utf-8", $interface))); // JSON解码 $vName = $obj->albumName; $videos = $obj->videos; // 获取视频内容数组 $xml = ""; if ($single) { foreach ($videos as $value) { // 遍历数组 $vid = $value->vid; // 获取单个视频ID $vnames = $value->name; // 获取单个视频名称 $page = file_data("http://m.tv.sohu.com/v" . $vid . ".shtml"); preg_match('/downloadUrl:"(.*)"/iUs', $page, $arr); $xml .= '<m type="" src="' . $arr[1] . '&start={start_bytes}" stream="true" label="' . $vnames . "\" />\n"; // 写入XML内容 } } else { foreach ($videos as $value) { // 遍历数组 $vid = $value->vid; // 获取单个视频ID $vnames = $value->name; // 获取单个视频名称 $xml .= '<m type="sohu" src="' . $vid . '" label="' . $vnames . "\" />\n"; // 写入XML内容 } } return array("xml" => "<list>\n" . $xml . '</list>', "lists" => $xml, "vName" => $vName); // 输出剧集头和剧集列表 }
/** * 制作列表 * @param string $id 视频ID * @return array 视频列表及视频名称 */ public function listpage($id) { if (strpos($id, "http://") > -1) { $page = file_data($id); preg_match('/var commentTitle = "(.*)"; \\/\\/评论标题.*<div\\s*id="dsj_lanmu"><ul>(.*)<div class="vspace"><\\/div>/iUs', $page, $arr); $vName = $arr[1]; preg_match_all('/<div class="text"><A href="(.*)">(.*)<\\/A><\\/div>/iUs', $arr[2], $arr); $xml = ""; $combine = array_combine($arr[1], $arr[2]); foreach ($combine as $key => $value) { $page = file_data($key); preg_match('/videoId:"([0-9a-z]+)",/iUs', $page, $ar); $xml .= '<m type="merge" src="' . U("merge", array("id" => $ar[1])) . '" label="' . $value . "\" />\n"; } } else { $vName = $this->merge($id); $xml = '<m type="merge" src="' . U("merge", array("id" => $id)) . '" label="' . $vName . "\" />\n"; } return array("xml" => "<list>\n" . $xml . "</list>", "lists" => $xml, "vName" => $vName); }
/** * 采集页面 */ public function listpage($keywords) { if (!$keywords) { return "关键字错误!"; } $page = file_data("http://www.soku.com/v?keyword=" . urlencode($keywords)); preg_match('/<li class="p_thumb"><img class="" src=".*" alt="(.*)"><\\/li>/iUs', $page, $arr); $vName = $arr[1]; if (preg_match_all('/<span\\s+name="(.+)"\\s+id="site\\d*"><a href="(.*)"\\s+_log_title="(.+)"\\s+_log_sid.*<img/iUs', $page, $arr)) { $ar[] = $arr[2]; $ar[] = $arr[1]; } else { preg_match_all("/<li(?: class=\"(?:ex|xe)\")?><a href='(.*)' _log_title='.*' site='(\\w+)' _log_type='2' _log_ct='1' _log_pos=1 _log_directpos='4' _log_sid=\"\\d+\" _log_cate=\"\\d+\" target='_blank'>\\d+<\\/a><\\/li>/iUs", $page, $arr); $ar[] = $arr[1]; $ar[] = $arr[2]; } $array = array(); foreach ($ar[0] as $key => $value) { $k = $ar[1][$key]; $array[][] = $value; } $string = ""; // p($array);die; foreach ($array as $value) { if (strpos($value[0], "56.com") > -1) { $tvtype = "Wuliu"; $page = file_data($value[0]); preg_match('/"opera_id":(\\d{4,6}),/iUs', $page, $arr); $collect = A("Data/" . $tvtype . "/listpage", array($arr[1])); $m = '<m label="' . $vName . "-56\">\n"; } elseif (strpos($value[0], "cntv.cn") > -1) { // CNTV $tvtype = "Cntv"; $page = file_data($value[0]); preg_match('/videoCenterId","(\\w+)"/iUs', $page, $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-cntv\">\n"; } elseif (strpos($value[0], "funshion.com") > -1) { // 风行 $tvtype = "Funshion"; $id = substr($value[0], 32); $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-风行\">\n"; } elseif (strpos($value[0], "iqiyi.com") > -1) { // 爱奇艺 $tvtype = "Iqiyi"; $page = file_data($value[0]); preg_match('/(?:"albumId"\\s*:\\s*|data-player-albumid="|data-drama-albumid=")(\\d+)(?:,|")/iUs', $page, $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-爱奇艺\">\n"; } elseif (strpos($value[0], "letv.com") > -1) { // 乐视 $tvtype = "Letv"; $page = file_data($value[0]); preg_match('/title:"(.*)",\\/\\/视频名称.*vid:(\\d+),\\/\\/视频ID/iUs', $page, $arr); $collect = A("Data/" . $tvtype . "/listpage", array($arr[2], $arr[1])); $m = '<m label="' . $vName . "-乐视\">\n"; } elseif (strpos($value[0], "m1905.com") > -1) { // M1905 $tvtype = "M1905"; $page = file_data($value[0]); preg_match("/vid\\s*:\\s*(?:'|\")(\\d{4,8})(?:'|\"),/iUs", $page, $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-M1905电影网\">\n"; } elseif (strpos($value[0], "pps.tv") > -1) { // PPS $tvtype = "Pps"; $page = file_data($value[0]); preg_match('/sid:\\s?"?(\\d+)"?,/iUs', $page, $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-PPS\">\n"; } elseif (strpos($value[0], "pptv.com") > -1) { // PPTV $tvtype = "Pptv"; preg_match("/page|show\\/(.*)\\.html/iUs", $value[0], $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-PPTV\">\n"; break; } elseif (strpos($value[0], "sina.com.cn")) { // 新浪 $id = substr($value[0], 38); $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-新浪\">\n"; } elseif (strpos($value[0], "qq.com") > -1) { // 腾讯 $tvtype = "Qq"; $collect = A("Data/" . $tvtype . "/listpage", array($value[0])); $m = '<m label="' . $vName . "-腾讯\">\n"; } elseif (strpos($value[0], "sohu.com") > -1) { // 搜狐 $tvtype = "Sohu"; $page = file_data($value[0], array("gbk", "utf-8")); preg_match('/var (?:(?:PLAYLIST_ID)|(?:playlistId))\\s*=\\s*"(\\d+)";/iUs', $page, $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-搜狐\">\n"; } elseif (strpos($value[0], "tudou.com") > -1) { // 土豆 $tvtype = "Tudou"; $id = $value[0]; $collect = A("Data/" . $tvtype . "/GetVideoId", array($id)); $m = '<m label="' . $vName . "-土豆\">\n"; } elseif (strpos($value[0], "youku.com") > -1) { // 优酷 $tvtype = "Youku"; preg_match('/(?:http:\\/\\/)?(?:www|v)?\\.youku\\.com\\/(?:v_show|show_page)\\/id_(\\w+)\\.html/iUs', $value[0], $arr); $id = $arr[1]; $collect = A("Data/" . $tvtype . "/listpage", array($id)); $m = '<m label="' . $vName . "-优酷\">\n"; } $string .= $m . $collect["lists"] . "</m>\n"; } return array("xml" => "<list>\n" . $string . "</list>", "lists" => $string, "vName" => $vName); }
/** * 抓取微云真实地址 */ public function weiyun() { //http://share.weiyun.com/07c1c7028ff29badbc3d10b839f21d2b if (!Q("get.id")) { $this->error("页面不存在!"); } $key = Q("get.id"); $referer = "http://share.weiyun.com/" . $key; $src = file_data($referer, array(), 1, "", "", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us)"); preg_match('|shareInfo = (.*);|iUs', $src, $res); $json = $res ? json_decode($res[1]) : exit("Can not get shareInfo!"); p($json); $songurl = implode("", array("http://" . $json->dl_svr_host, ":" . $json->dl_svr_port, "/ftn_handler", "/" . $json->dl_encrypt_url, "?fname=" . urlencode($json->filename))); go($songurl); }
/** * 判断视频类型 * @param string $url 视频URL * @return string 返回列表 */ public function GetVideoId($url) { if (strpos($url, '/listplay/')) { $type = 'lid'; $mat = '|,lid\\s*=\\s*(\\d+)\\s*\\n+.*lkw\\s*=\\s*"(.*)"|iUs'; } elseif (strpos($url, '/programs/')) { $type = 'iid'; $mat = "|iid:\\s?(\\d+)\\s*\n+.*,kw:\\s?'(.*)'|iUs"; } elseif (strpos($url, '/albumcover/')) { $type = 'aid'; $mat = "|aid:\\s?'(\\d+)',.*title:\\s?'(.*)',|iUs"; } elseif (strpos($url, '/albumplay/')) { $type = 'pid'; $mat = "|,vcode:\\s?'(\\w+)'.*,kw:\\s?\"(.*)\"|iUs"; } if ($mat) { if (preg_match($mat, file_data($url), $vid)) { $arr = $type . '_' . $vid[1] . '_' . $vid[2]; } if (!$arr) { return $this->listpage($arr); } } else { die('暂时不支持该格式的采集。'); } }
/** * 生成排行榜 * @param string $top 生成的页数 * @return string 返回视频列表 */ private function top($top) { $page = file_data('http://video.56.com/tv-v-tv_sort-v_tid-_zid-_yid-_page-' . $top . '.html', true); $preg = '#<a target="_blank" href="http://video.56.com/opera/(\\d+).html">(.*)</a>#iUs'; preg_match_all($preg, $page, $arr); // var_dump($arr); $combine = array_combine($arr[1], $arr[2]); foreach ($combine as $key => $value) { $interface = file_data('http://so.56.com/api_s/operaNew.php?key=&mid=' . $key . '.html'); $obj = json_decode($interface); $data = $obj->data; foreach ($data as $v) { $vid = $v->vid; $nameList = iconv('utf-8', 'gbk', $v->title); $xml .= '<m type="" src="http://vxml.56.com/m3u8/' . $vid . '/?appkey=3000001777" label="' . $value . ' ' . $nameList . "\" />\n"; } $lists .= '<m label="' . $value . "\">\n" . $xml . "</m>\n"; $xml = ''; } return "<list>\n" . $lists . '</list>'; }
/** * 无插件单集列表 * @param string $id 视频ID * @return string $c 视频URL */ public function single($vid) { $interface = file_data('http://cache.m.iqiyi.com/jp/qmt/' . $vid . '/'); preg_match_all('/m4u":"([^"]+)","vd":1,/iUs', $interface, $arr); foreach ($arr[1] as $value) { $v1 = file_data('' . $value . ''); preg_match('/l":"([^"]+)","t/iUs', $v1, $v2); $c = $v2[1]; } return $c; }
function import($fileid) { if (!isset($_FILES[$fileid]) || $_FILES[$fileid]['size'] == 0) { return false; } $this->text = file_data($_FILES[$fileid]['tmp_name']); $this->text = utf8_encode($this->text); $this->text2line(); $this->extract_date(); $this->insert(); $this->load_nameids(); $this->text2line(); $this->analyse(); $this->import_classes(); $this->import_teachers(); $_SESSION['notice'][] = 'supply schedule imported'; return true; }