sammo32 Posted March 17, 2011 Share Posted March 17, 2011 Hi guys. My situation is the following... I want to be able to play videos on a website using a media player. I currently have the pathnames of the videos stored in a mysql database and the videos stored on my file system. I intend to use some PHP script in order to locate the video pathname in the database and then pass it to the media player where it will play the file. I was wondering how i go about this? as i am fairly new to PHP. The media player i am using can be found at: http://rainbow.arch.scriptmania.com/scripts/music/video.html Any help would be much appreciated Quote Link to comment Share on other sites More sharing options...
ChemicalBliss Posted March 17, 2011 Share Posted March 17, 2011 It sort of tells you on that page but you would edit the "src" attribute. Wherever you put your video page, must have a relative path to your video from that page. For ex. Video page will be called "index.php" Video will be "test.mpeg" /index.php /some/path/to/test.mpeg If you have a relative path such as: some/path/to/test.mpeg It will work fine. However, If you index was in another folder for ex. /mysubwebsite/index.php /some/path/to/test.mpeg The relative path would need to be: ../some/path/to/test.mpeg --------- To actually insert the path, you would use an echo, with the variable that holds that path: <?php // This code goes BEFORE the player code $mypathtovids = "/some/path/to/"; $myvid = "test.mpeg"; ?> ... player code... src="<?php echo $mypathtovids, $myvid; ?>" .. the rest of the player code... Quote Link to comment Share on other sites More sharing options...
sammo32 Posted March 17, 2011 Author Share Posted March 17, 2011 Thanks loads mate, will give this a try later on and see how i get along Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.