php万能播放器- -
将以下代码保存为player.php,然后上传到你的php空间
使用方法:http://www.yourdomain.com/player.php?url=htttp://www.8le.net/test.wma
——->
td {
FONT-SIZE: 9pt; COLOR: #006600; FONT-FAMILY: “Arial”, “Helvetica”, “sans-serif”; TEXT-DECORATION: none; line-height:none;
}
八乐音乐网(本站所有内容均来自于网络 仅做宽带测试研究之用 如有侵权 请与本站联系)var message=”";
///
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.οnmοusedοwn=clickNS;}
else{document.οnmοuseup=clickNS;document.οncοntextmenu=clickIE;}
document.οncοntextmenu=new Function(“return false”)
// –>
/*
if($_GET['url']!=”){
$mov_url=$_GET['url'];
$mov_wigth=$_GET['w'];
$mov_height=$_GET['h'];
$mov_auto=$_GET['a'];
$mov_player=$_GET['p'];
*/
if($url!=”){
$mov_url=$url;
$mov_player=$p;
$mov_wigth=$w;
$mov_height=$h;
$mov_auto=$a;
$mov_file=basename($mov_url);
$mov_type=substr(strrchr($mov_file,’.'),1);
$mov_type=strtolower($mov_type);
if($mov_width==”){$mov_width=500;}
if($mov_height==”){$mov_height=450;}
if($mov_auto==”){$mov_auto=1;}
if($mov_player==”){$mov_player=0;}
$mov_player+=0;
if($mov_player==0 || $mov_player>3){
if($mov_type==”mp3″||$mov_type==”m3u”||$mov_type==”wmv”||$mov_type==”wvx”||$mov_type==”mpg”
||$mov_type==”mpeg”||$mov_type==”mpv”||$mov_type==”wax”
||$mov_type==”asf”||$mov_type==”asx”||
$mov_type==”wmx”||$mov_type==”wm”||$mov_type==”wma”){
?>
height==$mov_height?> codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components… type=application/x-oleobject>
>
>
}elseif($mov_type==”swf”){
?>
HEIGHT==$mov_height?>>
>
WIDTH==$mov_width?> HEIGHT==$mov_height?> PLAY=TRUE LOOP=TRUE QUALITY=HIGH>
}else{
?>
id=video1 width==$mov_width?> VIEWASTEXT>
>
>
}}
else if($mov_player==1){
?>
height==$mov_height?> codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components… type=application/x-oleobject>
>
>
}
else if($mov_player==2){
?>
id=video1 width==$mov_width?> VIEWASTEXT>
>
>
}
else if($mov_player==3){
?>
HEIGHT==$mov_height?>>
>
WIDTH==$mov_width?> HEIGHT==$mov_height?> PLAY=TRUE LOOP=TRUE QUALITY=HIGH>
}}else{echo “error!”;}
?>