Home > Backend Development > PHP Tutorial > Code used by php web player to play online videos (automatically determine and select the video file type)_PHP Tutorial

Code used by php web player to play online videos (automatically determine and select the video file type)_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:37:01
Original
1560 people have browsed it

In web development, we often encounter some simple video playback functions, but now the video format is different and can be added dynamically, so we must save the video to the data. Okay, let's take a look at the simple paragraph I wrote. php video web playerCode.

Copy code The code is as follows:

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?>-在线播放 jb51.net



//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)) {
//played by flashplayer
?>




}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322013.htmlTechArticleIn web development, we often encounter some simple video playback functions, but now the video format is different and can Dynamic increase, so we have to save the video to data, okay...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template