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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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