Soso Music web Player PHP Web player used to play online video code automatically determine and select the video file type

Source: Internet
Author: User
Tags prefetch shuffle
In web development often encounter some simple video playback function, but now the video format is different, and can be dynamically added, so we have to save the video to the data Oh, OK, let's look at the paragraph I wrote a simple PHP video web player code bar.

Copy the Code code as follows:


Include './admin/connect.php ';
@extract ($db->get_one ("select * from Movieinfo where.$_get[' id '].");
$db->query ("Update movieinfo set playnum=playnum+1 where.$_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
?>





}
?>

The above describes the Soso music web player PHP Web player used to play online video code automatic judgment and select the type of video file, including the Soso music Web player content, I hope that the PHP tutorial interested friends have helped.

  • 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.