getValues('mediaurl'); $content = $threadct; preg_match("/\[flash(=(\d+?)\,(\d+?)(\,(0|1))?)?\]([^\[\<\r\n\"']+?)\[\/flash\]/is",$content,$arr); $content = $arr[0]; //获取第一个flash标签 $content = preg_replace('/\[(.*?)flash(.*?)\]/i','',$content);//去除flash标签 if(substr(strrchr($content, '.'), 1) == 'swf' ){ return $content; } if ($config[lock] == '1') { if ($config[youku] == '1') { //youku $content = preg_replace("/http:\/\/v.youku.com\/v_show\/id_(.*?).html/i","http://player.youku.com/player.php/sid/\${1}/v.swf",$content); } if ($config[tudou] == '1') { //tudou $content = preg_replace("/http:\/\/www.tudou.com\/programs\/view\/([\w\-]+)\/?(.*?)/i","http://www.tudou.com/v/\${1}/&resourceId=0_04_05_99/v.swf",$content); $content = preg_replace('/http:\/\/www.tudou.com\/albumplay\/(.*?)\/(.*?).html(.*?)/i',"http://www.tudou.com/a/\${1}/&resourceId=0_04_05_99/v.swf",$content); $content = preg_replace('/http:\/\/www.tudou.com\/listplay\/(.*?)\/(.*?).html(.*?)/i',"http://www.tudou.com/l/\${1}/&resourceId=0_04_05_99/v.swf",$content); } if ($config[_56] == '1') { //56 $content = preg_replace('/http:\/\/www.56.com\/u(.*?)\/v_(.*?).html(.*?)/i',"http://player.56.com/v_\${2}.swf",$content); $content = preg_replace('/http:\/\/www.56.com\/w(.*?)\/play_album\-aid\-\d+_vid\-(.*?).html(.*?)/i',"http://player.56.com/v_\${2}.swf",$content); } if ($config[ku6] == '1') { //ku6 $content = preg_replace('/http:\/\/v.ku6.com\/show\/(.*?).html(.*?)/i',"http://player.ku6.com/refer/\${1}/v.swf",$content); $content = preg_replace('/http:\/\/v.ku6.com\/special\/show_(.*?)\/(.*?).html(.*?)/i',"http://player.ku6.com/refer/\${2}/v.swf",$content); } if ($config[yinyuetai] == '1') { //yinyuetai $content = preg_replace('/http:\/\/v.yinyuetai.com\/video\/(\d+)\/?(.*?)/i',"http://player.yinyuetai.com/video/player/\${1}/v_0.swf",$content); $content = preg_replace('/http:\/\/v.yinyuetai.com\/playlist\/(\d+)\/?(.*?)/i',"http://player.yinyuetai.com/playlist/player/\${1}/v_0.swf",$content); } } if ($content === false) return '发生错误'; return $content; } ?>