-
Updating links
I wondering if anybody can help me please.?
I am putting together a simple page that plays radio shows....
but i would like to be able to upload mp3 files (radio shows) to a certain folder, which would then be scaned by the actual page. The page would then only show the 5 newest shows. 
I am new to this and have no clue where to start, but am keen to learn!!
Please Help!!!
ThankYou!!
-
-
Do you mean that you want a media player with auto-populating playlist based on mp3 upload to a certain folder?
Like this? http://www.jemcon.org/upload_gallery.php or http://demo.jemcon.org/videos.php
It shows newest uploads at the top of the list and could be doctored to only 5 items. (whether it plays videos or just music without a 'screen' is totally configurable)
-
-
Updating Links
Yes this is what i am after!
how would i implement this? i'm quite new to this! lol 
Thanks!
-
-
Ok so i've got this so far and it works excatly how i need it;
$n = file_list(getcwd(),".jpg");
if($n) foreach($n as $f) echo "$f<br>";
im now stuck,,, how would i make the results linakable
e.g. the result is;
Hello.jpg <- how can i make this result link to the actual file?
Please Please Please help
Thankyou!!
-
-
Echo it as a link, including the filepath to where the file exists:
echo '<a href="path/to/file/'.$f.'">'.$f.'</a>';
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
The Following User Says Thank You to djr33 For This Useful Post:
-
How come we've gone from mp3s to jpgs?
I was trying to sort you a clean version of the media player with auto-populating playlist but is that even needed anymore?
Either way, my hands are tied at the moment as the snow here is getting quite bad and I've literally just lost the internet - I'm stuck on my BlackBerry for now
-
The Following User Says Thank You to Beverleyh For This Useful Post:
-
Thanks Djr33 for your reply, it sorted it out!! 
and sorry Beverleyh, it is still for mp3s and appreciate that you put time into sorting me out the player, i was just trying to make it easier for myself...

im using this below to scan the folder for txt files which has the tracklistings in. The name of the file is echoed onto the page where it can be clicked to view.. the problem i am having now is that it displays the file extension (.txt) on the page.. and that i cant have gaps in the filename otherwise the GET dosent register the whole name..... Please help!! 
Thanks
<?php
function file_list($d,$x){
foreach(array_reverse(scandir($d),array('.')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;
return $l;
$file_list = array_reverse($file_list, true); }
$n = file_list(getcwd(),".txt");
if($n) foreach($n as $f) echo
"<a href=?id=$f class='styleradiolist'>TerminalOne - Episode $f</a><br>";
?>
<?php
$myFile=$_GET['id'];
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
?>
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks