Results 1 to 4 of 4

Thread: Help me with php playlist.

  1. #1
    Join Date
    Oct 2008
    Posts
    37

    Help me with php playlist.

    Hi,

    I want some help with php & playlist. I understand adding a player but having some problem with the playlist.
    I dont understand How to do with the playlist in php?
    Can anyone help me?

  2. #2
    Join Date
    Apr 2008
    Posts
    53

    Re: Help me with php playlist.

    I have similar kind of question for you guys.
    The filenames for accentuations. Here they produce very unexpected chars in the playlist.
    The playlist uses flv player & the scriopt also scrolls through the playlist but dont show me the thumb. I want the player to play only flv filres is this possible? how?
    Can you make me understand this?

  3. #3
    Join Date
    May 2008
    Posts
    42

    Re: Help me with php playlist.

    Try YouTube php Playlist
    YouTube Playlist is a fully customizable PHP script to create niche-targeted playlists of videos from YouTUBE. You can gather your own videos either by thematic relevance, or as part of a series. If you have a longer video, it makes sense to break it down into several clips, each with clear title, so that viewers can opt to skip to particularly interesting parts of your movie. Either way, you have cut out some of the search and navigation work required of your potential audience, and won them over in the process. The ability to select and bring to other people's attention little-seen videos is a skill in and of itself, and people will thank you for taking the time. Data is pulled dynamically from the content providers - no mysql database required.

  4. #4
    Join Date
    Nov 2008
    Posts
    109

    Re: Help me with php playlist.

    The easiest way to use this script is to place it in the same directory as your mp3's then make a request to the php. The php will return an XML with the song Path, Title, and Author which is great for Flash.
    Author: http://snipplr.com/view/5513/php-mp3-playlist/

    Code:
          <?php
    
          $dir = 'directory_of_mp3_files';
          $file_type = 'mp3';
          $play_list = '<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>';
    
          $play_list .= "<playlist>";
    
          // Open directory, read contents and add to file_list if correct file_type
    
          if (is_dir($dir)) {
          if ($dh = opendir($dir)) {
          while (($file = readdir($dh)) !== false) {
          if ($file != '.' && $file != '..') {
          $name_array = explode('.', $file);
    
          // if file has .mp3 extension
    
          if ($name_array[1] == $file_type) {
          $play_list .= '<song>';
          $file = "$dir/$file";
          $play_list .= '<file>' . $file . '</file>';
          $mp3 = fopen($file, "r");
          fseek($mp3, -128, SEEK_END);
          $tag = fread($mp3, 3);
           
          // if id3 tag is found...
          if ($tag == "TAG") {
          $play_list .= '<title>' . trim(fread($mp3, 30)) . '</title>';
          $play_list .= '<artist>' . trim(fread($mp3, 30)) .'</artist>';
           
          // if no id3 tag...
          } else {
          $play_list .= '<title>unknown title</title>';
          $play_list .= '<artist>unknown artist</artist>';
          }
           
          // close file
          fclose($mp3);
          $play_list .= '</song>';
          }
          }
          }
           
          // close directory
          closedir($dh);
          $play_list .= '</playlist>';
           
          // echo the xml file
          echo "$play_list";
          }
          }
           
          ?>

Similar Threads

  1. How is the playlist in Rocksmith?
    By Bhuvnesh 1 in forum Video Games
    Replies: 5
    Last Post: 14-12-2011, 11:11 AM
  2. Can I play m3u Playlist in VLC 1.1.0?
    By Mykola in forum Windows Software
    Replies: 4
    Last Post: 09-07-2011, 10:17 AM
  3. Track won't appear on playlist on Zen MX
    By Maal-Gaadi in forum Portable Devices
    Replies: 3
    Last Post: 16-04-2011, 06:17 AM
  4. Can’t synchronies my playlist
    By Lhamu in forum Portable Devices
    Replies: 4
    Last Post: 13-03-2011, 08:18 PM
  5. How to make Playlist in VLC 1.1.4
    By leshaspar in forum Media Player
    Replies: 3
    Last Post: 27-11-2010, 02:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,456,108.32884 seconds with 17 queries