...

View Full Version : PHP media player (different formats)



light_in_tunel
02-04-2007, 12:59 AM
Hi to you all!

I'm trying to have a dynamic page where a script calls a file and plays it using the correct plug in. i'll explain it better: In a mysql DB i have data concerning size, path, type (and what else..) of the playable files. Those files will have differents formats (avi, QTVR, flv, jpeg, swf,etc) and so, diffents plugin.

Now i need to build a script that fetches that data from the DB and in a PHP page plays it with the correspondent plugin.

Is this possible? And if so, can anyone point me out a way to start?

Thank you in advance

StupidRalph
02-04-2007, 02:40 PM
I think its possible. Mind posting how you have your DB set up.

light_in_tunel
02-06-2007, 03:18 PM
I have a table called "documento" wich have the following fields: id, path, date, type, size. I assume i have to retrieve the path and type. Was this information you were looking for?

scrupul0us
02-06-2007, 03:32 PM
sounds basic... all u need is a control loop

if type = "x" output this type of control/object
elseif type = "y" output this type of control/object
elseif type = "z" output this type of control/object
else do this

light_in_tunel
02-06-2007, 05:35 PM
i thought it might be like that.

then, in the control path i should poin the file's path using echo and the db field, right?

scrupul0us
02-06-2007, 06:19 PM
yup :) you got it



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum