In fact, php video playback code is basically supported in common video formats. It uses regular expressions to match file extensions and calls the corresponding online player code based on different file extensions.
In fact, php video playback code is basically supported in common video formats. It uses regular expressions to match file extensions and calls the corresponding online player code based on different file extensions.
Some simple video playing functions are often encountered in web development, but the video formats are different and can be dynamically increased. Therefore, we must save the video to Data, now let's take a look at the simple section I wrote.
Php videoCode.
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']. "'");
// Control download
$ Url2 = "admin/"; // path for storing Software
If ($ localaddress)
{
$ Newname = $ localaddress;
$ Movieurl = $ url2. $ newname;
}
?>
<? = $ Title?> -Play jb51.net online
// MediaPlayer playback
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 )){
// Played by RealPlayer
?>
} Elseif (eregi (". swf $", $ movieurl )){
// Played by Flash Player
?>
}
?>