Forum Moderators: coopster

Message Too Old, No Replies

play video/audio from link stored in database

script displays the path instead of actual media

         

dewteks

5:02 pm on Dec 14, 2007 (gmt 0)

10+ Year Member



Hi fellows
Compliments to the seasons to you all and wishing u a bountiful new year in advance.

I have a link to upload videos or audio to a folder on my server and have the path store in the database but i have challenges viewing the actual video.
it displays the path instead.

Any help will be appreciated.

thanks
............
$result = @mysql_query('SELECT id, filename FROM demo where id=5');
if (!$result) {
exit('<p>Error performing query: ' .
mysql_error() . '</p>');
}

while ($row = mysql_fetch_array($result)) {

$trailer = $row['filename'];
$show='<embed src=" upload/$trailer" width="346" height="258"> </embed>';

echo ($show);

}

phparion

6:30 am on Dec 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



your method to display videos is in-efficient. People can find the actual file paths from your source code and can either download your videos directly or hotlink your videos. Both hacks will waste lots of your bandwidth quota and might slow down your website. If your videos are paid videos then you will have to be bear the definite loss too.

The widely used method is to use a flash player to stream your videos like done on youtube or myspace. Though different methods are used nowadays to download flv files even from them but you can secure that I guess and still that is a better way.

You can also use OBJECT proper coding rather than embed tags.

Also if possible post your html parsed source code of the page which shows the video.

dewteks

2:47 pm on Dec 16, 2007 (gmt 0)

10+ Year Member




........................................
The widely used method is to use a flash player to stream your videos like done on youtube or myspace. Though different methods are used nowadays to download flv files even from them but you can secure that I guess and still that is a better way.

You can also use OBJECT proper coding rather than embed tags.
...................................................

thanks, its just suppose to display video trailers, d reason im not considering hosting on a media server now.

it was displaying the file name before i used embed tag, it just displays a page similar to an image placeholder icon. As if no variable is passed to the embed tag.

so what about the OBJECT proper coding? how do i go about it?
thanks