Small script that lists all videos in a directory and enables watching with Webplayer
I don't now if anybody is interested in this one. But I created a PHP script that searches for all movies in a directory, then put them into a selection form. A visitor to the page can select a video and it is played with Divx Webplayer.
The main part of the PHP file is from Greg Johnson! =>> http://greg-j.com/phpdl/
He wrote a nice PHP script that scans all files in a directory and list them. I changed his code and used the Webplayer SDK to create an automatic updated list of movies. The visitor just selects the movie he wants to watch and it starts to stream.
Hope this very basic PHP script is usefull to someone.
See an example here:
http://www.giesecke.tk/movies/#divxplaydir.php
Download the script from
http://www.giesecke.tk/scripts/divxplaydir.zip
Have fun with the script. Improve it and post it here!
License Agreement
NO COMMERCIAL USE: This License Agreement grants our community members the right to use the Software downloaded from DivX Labs for personal use only in order to evaluate and provide feedback about it to DivX, Inc. Commercial use of the Software or of the work products resulting from its use is not permitted under the Terms of Use of DivX Labs.- To read the full Terms of Use please visit the Terms of Use page.
- To inquire about commercial licensing please email us


dear beegee1962 how are you?, well, i have some blogs and need to put a code with the divx player, not a link, for my visitors can watch videos o movies online from mi site or from another site,
thanks
Hello,
This script is great though the function works only with root directory and not with sub-directories under the root folder. Is it possible somehow to get the files from subfolders also listed in Drop Down box?
Thanks
This script does not work on my Apaché
This looks phenomenal, I actually have been looking for something like this for both live streaming tv and for Divx. My question to you is, is it mandatory to host the movie yourself? I use embedding features from other hosting services and do not hold video files on my own server. Will this work or is there another script I should be using instead. Thanks.
Has anyone tried using this with a symbolic link on windows? I have my media file on my C:\ drive and my root docs on my E:\ drive. I created a symlink E:\moveis\cmovies, cmovies being a symbolic link to C:\movies. When I change line 3 in dir.php to E:\movies\Cmovies\media the page loads and it shows all the avi files however, when I try to play any of them I get "File does not exist: E:/movies/media/movie.avi, referer: http://192.168.1.100:8080/divx.html" in my error log. Has anyone tried accessing files with divx web player over a symlink on XP and, if so were you able to fix the problem?
Updated the script, removed some bugs.
History: 1.0 - basic script, manual adaption of path necessary
1.1 - enhanced calculation of path, works now with out adaption, accepts even a name change of the script
1.2 - removed bug that led to wrong path calculation if script was in subdir
corrected path in original post. You can now find the file and the demo.
edit 2009/04/05:
Included #DIVXPLAYDIR script into my website design. Test it here:
http://www.giesecke.tk/movies
New download path: http://www.giesecke.tk/scripts/divxplaydir.zip
This is VERY COOL! Thanks for making this... I tried this out on one of my sites and it worked. At some point, we're going to have a DivX gallery where we showcase applications, scripts, and DivX implementations on our website. Do we have your permission to post a link to your script there when we go live?
Everybody can use this script and post links to it. I am happy that some people find it usefull.
Very useful script and exactly what I was looking for!
However, I have problems to get it work on my home apache in a virtual directory (different drive). The dropdown list is always empty. I suppose that there are some path problems.
I hope that someone can look into this and I am thankful for any advice.