In the Web development often encounter some simple video playback function, but now the video format is different, and can be dynamically increased, so we have to save the video to the data Oh, OK, let's see what I wrote in the paragraph simple
PHP video web playerCode Bar.
Copy CodeThe 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
$url 2= "admin/";//the path where the software is stored
if ($localaddress)
{
$newname = $localaddress;
$movieurl = $url 2. $newname;
}
?>
<title><?= $title? >-online Play Jb51.net</title>
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)) {
RealPlayer played by
?>
}elseif (Eregi (". swf$", $movieurl)) {
Flashplayer played by
?>
}
?>
http://www.bkjia.com/PHPjc/322013.html www.bkjia.com true http://www.bkjia.com/PHPjc/322013.html techarticle in web development often encounter some simple video playback function, but now the video format is different, and can be dynamically increased, so we have to save the video to the data Oh, OK ...