|
本帖最后由 xinxin8816 于 2011-7-10 16:22 编辑
下面有flash,请点击并等待他加载完成,然后试试能不能用。
http://xin123.tk/tv/cmp.swf
腾讯太骚了,怎能不好好利用它的资源?!上面的flash除了我的3首歌和xuanlove MTV,别的都是腾讯的。
所以,利用PHP吸血
list.xml插入以下代码,即可引用:
- <m label="XXX" list_src="letv.php" />
复制代码
舍不得花钱,复制以下代码:
吸血乐视视频
演示:http://1.tuifei.sinaapp.com/cmp/cmp.swf?lists=/code/letv.php
- <?php
- function file_data($url) {
- $user_agent = $_SERVER['HTTP_USER_AGENT'];
- $ch = curl_init();
- $timeout = 30;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
- @ $c = curl_exec($ch);
- curl_close($ch);
- return $c;
- }
- function re_place($str) {
- $s = str_replace('\/', '/', $str);
- return $s;
- }
- function get_u($u) {
- global $fname;
- $list = '';
- if ($u == 'm') {
- for ($i = 1; $i <= 49; $i++) {
- $q = 'http://list.letv.com/movie/iq_aq_dq_octime_lg_p' . $i . '.html';
- $list .= '<m label="第' . $i . '页" list_src="' . $fname . '?m=' . $q . '" />' . "\n";
- }
- }
- elseif ($u == 'tv') {
- for ($i = 1; $i <= 49; $i++) {
- $q = 'http://listapp.letv.com/listpage/list/c/5/i/q/a/q/d/q/o/rate/l/g/p/' . $i . '/';
- $list .= '<m label="第' . $i . '页" list_src="' . $fname . '?tv=' . $q . '" />' . "\n";
- }
- } else {
- for ($i = 1; $i <= 49; $i++) {
- $q = 'http://www.letv.com/vchannel/new_ch' . $u . '_d1_p' . $i . '.html';
- $list .= '<m label="第' . $i . '页" list_src="' . $fname . '?n=' . $q . '" />' . "\n";
- }
- }
- return $list;
- }
- function get_n($n) {
- global $fname;
- $str = file_data($n);
- $list = '';
- preg_match_all('|<dt><a target="_blank" title="([^>]+)\.html">|', $str, $a1);
- foreach ($a1[1] as $k => $v) {
- $a2 = explode('" href="', $v);
- $a3 = str_replace('http://www.letv.com/ptv/vplay/', '', $a2[1]);
- $a4 = $a2[0];
- $list .= '<m label="' . $a4 . '" src="' . $fname . '?id=' . $a3 . '" />' . "\n";
- }
- return $list;
- }
- function get_m($m) {
- global $fname;
- $str = file_data($m);
- $list = '';
- preg_match_all('|<dt><a href="([^>]+)" target="_blank">|', $str, $a1);
- foreach ($a1[1] as $k => $v) {
- $a2 = explode('" title="', $v);
- $a3 = $a2[1];
- $list .= '<m label="' . $a3 . '" src="' . $fname . '?mid=' . $a2[0] . '" />' . "\n";
- }
- return $list;
- }
- function get_tv($tv) {
- global $fname;
- $str = file_data($tv);
- $list = '';
- preg_match_all('|<dt><a href="([^>]+)" target=|', $str, $a1);
- foreach ($a1[1] as $k => $v) {
- $a2 = explode('" title="', $v);
- $a3 = $a2[1];
- $list .= '<m label="' . $a3 . '" list_src="' . $fname . '?tvid=' . $a2[0] . '" />' . "\n";
- }
- return $list;
- }
- function get_tvid($tvid) {
- global $fname;
- $strl = file_data($tvid);
- preg_match('|<h1 class="fl">([^<]+)<small>|', $strl, $name);
- preg_match_all('|<li>\s+<a href="([^>]+)"|ims', $strl, $as);
- $name = htmlspecialchars($name[1], ENT_QUOTES);
- $list = '';
- foreach ($as[1] as $k => $v) {
- $z = $k +1;
- $list .= '<m src="' . $fname . '?mid=' . $v . '" label="第' . $z . '集" />';
- }
- return $list;
- }
- function get_mid($mid) {
- $strl = file_data($mid);
- preg_match('|vid:([0-9]+),|', $strl, $as);
- $vd = 'http://app.letv.com/v.php?id=' . $as[1];
- $str = file_data($vd);
- preg_match('|"url":"([^"]+)"|', $str, $a);
- $c = re_place($a[1]);
- $fp = file_data($c);
- preg_match('|"location": "([^"]+)"|', $fp, $ar);
- $d = re_place($ar[1]);
- header("location:$d");
- }
- function get_id($id) {
- $vd = 'http://app.letv.com/v.php?id=' . $id;
- $str = file_data($vd);
- preg_match('|"url":"([^"]+)"|', $str, $a);
- $c = re_place($a[1]);
- $fp = file_data($c);
- preg_match('|"location": "([^"]+)"|', $fp, $ar);
- $d = re_place($ar[1]);
- header("location:$d");
- }
- function default_list() {
- global $fname;
- $lb = array (
- '电影' => 'm',
- '电视' => 'tv',
- '动漫' => '5',
- '娱乐' => '3',
- '体育' => '4',
- '汽车' => '14',
- '原创' => '7',
- '音乐' => '9',
- '搞笑' => '10',
- '科教' => '12',
- '生活' => '13',
- '其他' => '8'
- );
- $list = '';
- foreach ($lb as $k => $v) {
- $list .= '<m label="' . $k . '" list_src="' . $fname . '?u=' . $v . '" />' . "\n";
- }
- return $list;
- }
- $fname = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["SCRIPT_NAME"];
- $xml = "<?xml version="1.0" encoding="GBK" ?>\n<list>\n";
- if (isset ($_GET['u'])) {
- $xml .= get_u($_GET['u']);
- }
- elseif (isset ($_GET['n'])) {
- $xml .= get_n($_GET['n']);
- }
- elseif (isset ($_GET['m'])) {
- $xml .= get_m($_GET['m']);
- }
- elseif (isset ($_GET['mid'])) {
- $xml .= get_mid($_GET['mid']);
- }
- elseif (isset ($_GET['tvid'])) {
- $xml .= get_tvid($_GET['tvid']);
- }
- elseif (isset ($_GET['tv'])) {
- $xml .= get_tv($_GET['tv']);
- }
- elseif (isset ($_GET['id'])) {
- get_id($_GET['id']);
- } else {
- $xml .= default_list();
- }
- $xml .= "</list>\n";
- echo $xml;
- ?>
复制代码
吸血腾讯MTV:
演示:http://tuifei.sinaapp.com//cmp/cmp.swf?lists=/qq/qqmtv.php
-
- <?php
- function g_s($url) {
- $user_agent = $_SERVER['HTTP_USER_AGENT'];
- $ch = curl_init();
- $timeout = 30;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
- @ $c = curl_exec($ch);
- curl_close($ch);
- $c = mb_convert_encoding($c, 'GBK', 'UTF-8');
- return $c;
- }
- $xml = '<?xml version="1.0" encoding="GBK" ?>';
- $xml .= "\n";
- $xml .= '<list>';
- $xml .= "\n";
- $filename = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["SCRIPT_NAME"];
- if (isset ($_GET['sid'])) {
- $singer_str='';
- for($i=1;$i<=3;$i++){
- $singer_url = 'http://sns.video.qq.com/tvideo/fcgi-bin/GetSingerMV?otype=json&sort=3&id=' . $_GET['sid'] . '&dis=0&page='.$i.'&callback=jsonp2182423&_=2182423';
- $singer_str .= g_s($singer_url);}
- preg_match_all('|"title":"([^"]*)"|', $singer_str, $ar1);
- preg_match_all('|"vid":"([0-9a-zA-Z_]+)"|', $singer_str, $ar2);
- $ar = array_combine($ar2[1], $ar1[1]);
- foreach ($ar as $k => $v) {
- $xml .= '<m src="' . $filename . '?vid=' . $k . '" label="' . $v . '" />';
- $xml .= "\n";
- }
- }elseif (isset($_GET['vid'])) {
- $g = 'http://vv.video.qq.com/geturl?vid='.$_GET['vid'];
- $h = g_s($g);
- preg_match('|<url>(.*)</url>|', $h, $j);
- $j=$j[1];
- header("location:$j");
- }else{
- $surl = 'http://v.qq.com/music/singer/index.html';
- $str = g_s($surl);
- preg_match_all('|singer_0_0_0_0.html\?sort=2&id=([0-9]+)&dis=0&page=1|', $str, $ar1);
- preg_match_all('|&dis=0&page=1">(.*)</a></li>|', $str, $ar2);
- $ar = array_combine($ar1[1], $ar2[1]);
- foreach ($ar as $k => $v) {
- $th=array('<','>','&');
- $v=str_replace($th,'',$v);
- $xml .= '<m list_src="' . $filename . '?sid=' . $k . '" label="' . $v . '" />';
- $xml .= "\n";
- }
- }
- $xml .= '</list>';
- echo $xml;
- ?>
复制代码
吸血腾讯动漫:
演示:http://tuifei.sinaapp.com/cmp.swf?lists=qq/cartoon.php
-
- <?php
- function g_s($url) {
- $user_agent = $_SERVER['HTTP_USER_AGENT'];
- $ch = curl_init();
- $timeout = 30;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
- @ $c = curl_exec($ch);
- curl_close($ch);
- $c = mb_convert_encoding($c, 'GBK', 'UTF-8');
- return $c;
- }
- $xml = '<?xml version="1.0" encoding="GBK" ?>';
- $xml .= "\n";
- $xml .= '<list>';
- $xml .= "\n";
- $filename = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["SCRIPT_NAME"];
- if (isset ($_GET['id'])) {
- $a = $_GET['id'];
- $a = str_replace('detail', 'cover', $a);
- $b = g_s($a);
- preg_match_all('#<li><a target="_self" href="javascript:;" id="([0-9a-zA-Z]+)" title=#', $b, $c);
- preg_match('|<span>(.*)</span>|U', $b, $f);
- $c = $c[1];
- @$f=htmlspecialchars($f[1], ENT_QUOTES);
- foreach ($c as $d => $e) {
- $d = $d +1;
- $xml .= '<m src="' . $filename . '?vid=' . $e . '" label="' . $f . '-' . $d . '" />';
- $xml .= "\n";
- }
- }
- elseif (isset ($_GET['vid'])) {
- $g = 'http://vv.video.qq.com/geturl?vid=' . $_GET['vid'];
- $h = g_s($g);
- preg_match('|<url>(.*)</url>|', $h, $j);
- $j = $j[1];
- header("location:$j");
- }
- elseif (isset ($_GET['tv'])) {
- $k = 'http://sns.video.qq.com/fcgi-bin/txv_lib?mi_mtype=9&mi_type=-1&mi_year=-1&mi_area=-1&mi_show_type=0&mi_sort=2&mi_pagesize=30&mi_pagenum=' . $_GET['tv'] . '&mi_online=1&mi_index_type=0&otype=json&&_=2182813';
- $l = g_s($k);
- //$l = mb_convert_encoding($l, 'GBK', 'UTF-8');
- preg_match_all('|cover_id":"([0-9a-zA-Z]+)"|', $l, $m);
- preg_match_all('|"title":"([^"]+)","year|', $l, $n);
- //var_dump($n);
- $m = $m[1];
- $n = $n[1];
- $list = '';
- $num = count($m);
- for ($o = 0; $o < $num; $o++) {
- $nm=$m[$o];
- $mn=str_split($nm,1);
- @$newname = htmlspecialchars($n[$o], ENT_QUOTES);
- $list .= '<m list_src="' . $filename . '?id=http://v.qq.com/cover/'. $mn[0] .'/'.$nm. '.html" label="' . $newname . '" />';
- $list .= "\n";
- }
- $xml .= $list;
- } else {
- for ($p = 0; $p <= 13; $p++) {
- $z=$p+1;
- $xml .= '<m list_src="' . $filename . '?tv=' . $p . '" label="NO.' . $z . '" />';
- $xml .= "\n";
- }
- }
- $xml .= '</list>';
- $nullurl = '<m list_src="' . $filename . '?id=http://v.qq.com/cover.html" label="" />';
- $nullname = 'label="NULL Name"';
- $xml = str_replace('label=""', $nullname, $xml);
- $xml = str_replace($nullurl, '', $xml);
- echo $xml;
- ?>
复制代码
如果你懒到一种境界了,下载我的源码吧~~~
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|