Php video webpage player code example-PHP source code

Source: Internet
Author: User
Tags prefetch
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 php video webpage player code I wrote. 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 php video webpage player code I wrote.

Script ec (2); script

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?> -Online playback



// 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
?>































The Code is as follows:


} Elseif (eregi (". swf $", $ movieurl )){
// Played by Flash Player

?>




}
?>

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.