Dear all, i want to play most of all video files in browser, is it possible? can any buddy help me out.
thanks in advance.
Dear all, i want to play most of all video files in browser, is it possible? can any buddy help me out.
thanks in advance.
PHP is a server-side programming language for dynamically generating content. This will not help you play videos for the end-user. For that, you will either need to stream the video and count on the user having a plugin, or you will need to use some sort of end-user video player, perhaps using Flash. PHP isn't really what you're looking for here, as it just generates content to send to the browser.
I assume you're talking about a web server, and you want all of them to appear in your browser window?
You're going to need a JavaScript or Flash video player to play the files in the browser. Some that I've used in the past are http://flowplayer.org/ and http://ajaxian.com/archives/jsonvid-pure-javascript-video-player
You probably want to use PHP, if you're going to use PHP, to list all the video files on your server (which I am assuming is Linux). You're going to want to use UNIX utilities instead of building your own, I'd imagine; probably a recursive find command. So your PHP code will look something like:
<?php
$files = `find BASE_DIRECTORY -name *.FILE_EXTENSION`;
foreach ($files as $file)
{
// Display viewer
}
?>
At work we do just this. Assuming that you're talking about a webserver, it's pretty easy to set up. I second the earlier recommendation of flowplayer from http://www.flowplayer.org.
Load your videos into a webserver-accessible directory, generate a list of them with php, and use that list to activate the flowplayer, which can be controlled with javascript.