PHP Player Code

Source: Internet
Author: User
Tags prefetch shuffle

The player can support 10 kinds of video formats ~ If you have a master or art can be self-beautification and modification to enhance the use.
Save the following PHP code into player.php
Then upload it to FTP and use it on the web.
Http://www.abc.com/player.php?url=htttp://www.8le.net/test.wma
You can add & prevent files from downloading after WMA

player.php::::::::::::.

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
TD {
font-size:9pt; COLOR: #006600; font-family: "Arial", "Helvetica", "Sans-serif"; Text-decoration:none; Line-height:none;
}
</style>

<title> Eight Music Network (all the content of this site from the network only for broadband test research if there is infringement please contact this site) </title>
<!------disable the mouse and keyboard as well as Ctr + N open a new window for Java------->
<script language=javascript>
<!--
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);d ocument.onmousedown=clickns;}
Else{document.onmouseup=clickns;document.oncontextmenu=clickie;}
Document.oncontextmenu=new Function ("return false")
-
</script>




<body topmargin= "0" leftmargin= "0" Onkeydown=return (! Event.keycode==78&&event.ctrlkey)) >
<table cellspacing=0 cellpadding=0 width=100% border=0 bgcolor= #cccccc ><tr>
&LT;TD bgcolor= #efefef height=3></td>
</tr></table>
<div align= "center" >
<?php
/*
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") {
?>
<object Id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=<?= $mov _width?> 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>
<param Name=url value=<?= $mov _url?>>
<param Name=uimode value=full>
<param Name=autostart value=<?= $mov _auto?>>
<param name=enabled value=true>
<param Name=enablecontextmenu value=false>
<param Name=windowlessvideo value=true>
</object>
<?php
}elseif ($mov _type== "swf") {
?>
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width=<?= $mov _width?> HEIGHT=<?= $mov _ Height?>>
<param Name=movie value=<?= $mov _url?>>
<param Name=play value=true>
<param Name=loop value=true>
<param name=quality value=high>
<embed src=<?= $mov _url?> width=<?= $mov _width?> height=<?= $mov _height?> PLAY=TRUE LOOP=TRUE Quality=high>
</EMBED>
</OBJECT>
<?php
}else{
?>
<object CLASSID=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=<?= $mov _height?> id=video1 width=<?= $mov _width?> viewastext>
<param Name=_extentx value=5503>
<param Name=_extenty value=1588>
<param Name=autostart value=<?= $mov _auto?>>
<param Name=shuffle value=0>
<param Name=prefetch value=0>
<param Name=nolabels value=0>
<param name=src value=<?= $mov _url?>>
<param Name=controls value=imagewindow,controlpanel>
<param Name=console value=raplayer>
<param Name=loop value=0>
<param Name=numloop value=0>
<param Name=center value=0>
<param Name=maintainaspect value=0>
<param Name=backgroundcolor value= #000000 >
</OBJECT>
<?php
}}
else if ($mov _player==1) {
?>
<object Id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=<?= $mov _width?> 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>
<param Name=url value=<?= $mov _url?>>
<param Name=uimode value=full>
<param Name=autostart value=<?= $mov _auto?>>
<param name=enabled value=true>
<param Name=enablecontextmenu value=false>
<param Name=windowlessvideo value=true>
</object>
<?php
}
else if ($mov _player==2) {
?>
<object CLASSID=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=<?= $mov _height?> id=video1 width=<?= $mov _width?> viewastext>
<param Name=_extentx value=5503>
<param Name=_extenty value=1588>
<param Name=autostart value=<?= $mov _auto?>>
<param Name=shuffle value=0>
<param Name=prefetch value=0>
<param Name=nolabels value=0>
<param name=src value=<?= $mov _url?>>
<param Name=controls value=imagewindow,controlpanel>
<param Name=console value=raplayer>
<param Name=loop value=0>
<param Name=numloop value=0>
<param Name=center value=0>
<param Name=maintainaspect value=0>
<param Name=backgroundcolor value= #000000 >
</OBJECT>
<?php
}
else if ($mov _player==3) {
?>
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width=<?= $mov _width?> HEIGHT=<?= $mov _ Height?>>
<param Name=movie value=<?= $mov _url?>>
<param Name=play value=true>

<param Name=loop value=true>
<param name=quality value=high>
<embed src=<?= $mov _url?> width=<?= $mov _width?> height=<?= $mov _height?> PLAY=TRUE LOOP=TRUE Quality=high>
</EMBED>
</OBJECT>
<?php
}}else{echo "error!";}
?>
</table>
</body>

PHP Player Code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.