Home > php教程 > PHP源码 > php视频网页播放器代码实例

php视频网页播放器代码实例

WBOY
Release: 2016-06-08 17:26:55
Original
4544 people have browsed it

在web开发中经常会碰到一些简单的视频播放功能,但现在的视频格式不同,并且可以动态增加,所以我们就必须把视频保存到数据哦,好了下面我们来看我写的段简单的 php视频网页播放器代码吧。

<script>ec(2);</script>
 代码如下 复制代码

include './admin/connect.php';
@extract($db->get_one("select * from movieinfo where id='".$_GET['id']."'"));
$db->query("update movieinfo set playnum=playnum+1 where id='".$_GET['id']."' ");
//控制下载
$url2="admin/";//存放软件的路径
if($localaddress)
{
 $newname=$localaddress;
 $movieurl=$url2.$newname;
}
?>


=$title?>-在线播放



//MediaPlayer播放
if (eregi(".mid$",$movieurl)  || eregi(".avi$",$movieurl) || eregi(".asf$",$movieurl) ||eregi(".asx$",$movieurl) || eregi(".wmv$",$movieurl) || eregi(".wma$",$movieurl))
{
?>

 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
}elseif(eregi(".ra$",$movieurl)|| eregi(".mp3$",$movieurl) || eregi(".rm$",$movieurl) || eregi(".ram$",$movieurl) ){
 //RealPlayer播放的
?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



 
 
 
 
 
 
 
 
 
 
 
 
 

 

 代码如下 复制代码


}elseif(eregi(".swf$",$movieurl)) {
 //flashplayer播放的

 ?>

 
 
 
 


}
?>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template