Jump to content

Video pathnames into media player???


sammo32

Recommended Posts

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 :)

 

 

Link to comment
https://forums.phpfreaks.com/topic/230934-video-pathnames-into-media-player/
Share on other sites

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.