This is a discussion on php & mysql radio within the Php and MySQL forums, part of the Programming / Scripting / Coding category; Ok, heres what i want to do. my cousins all have bands and i am making a radio thing similar ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| Newbie | Ok, heres what i want to do. my cousins all have bands and i am making a radio thing similar to the thing on launch.yahoo.com. I set up a database with the bands name, song title, and the embeded music code. I need to know how to set up the radio page so it moves to a random record (song) after the current record(song) is over. This is really important and i need it asap. if anyone could help, i would be extremely greatful. |
| | |
| | #3 (permalink) |
| Super Moderator Recent Blog: [CaRP] (6) [CaRP] XML error: Mismatched tag at line 6 - This appears to be an HTML webpage, not a feed. | this is what me and kyle wanted to do, this will be an interesting post to follow.
__________________ NewsBarrel.com Everything is banal and jejune, There is a planetary conspiracy against the likes of you and me in this idiot constituency of the moon, Well, he knew exactly who to blame, And we call upon the author to explain. |
| | |
| | #4 (permalink) |
| Senior Member | How are you embeding the music file? Are you using simply windows media player, or some sort of java applet? I would recomend you don't use windows media embeded, this causes problems. The early windows media players couldn't stream, and this would leave out mac and linux users. I don't know how you would know when the song was over unless you use scripting which you can put into things played with windows media. I forget its name but theres a way (in movies at least), where at a certian point in the file you can do stuff like launch webpages, etc. You could have it launch a php script, that goes to your next song. This is your best bet, but remember, its incompadible with alot of things. |
| | |
| | #8 (permalink) |
| Cool Newbie | okay then you asked to explain here it is. you put the file in where it says the mix here and then it opens it counts the ammount of lines (songs) picks a random one and outputs it as what song your listening too. I don't know the code to embedd music with wmp so you take the $lines[$rand] and that file is what you send to the embeded player. Code: <?php
srand((double)microtime()*1000000);
$lines = file('themixhere');
$amt = count($lines);
$rand = rand(0, $count);
echo $lines[$rand];
?>
|
| | |
| Tags |
| mysql, php, radio |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Save Internet Radio. | Fedz | General Webmaster Discussion | 5 | 07-05-2007 20:25 |
| WMT Radio? | Morphmaster | Comments / Suggestions | 73 | 25-07-2005 15:27 |
| Graphical Radio/Checkbox NEW | FrozenDice | Website Development Forum | 0 | 13-07-2005 19:42 |
| The computer world radio live! | Lewis | Ads, Offers & Services | 1 | 07-05-2005 11:54 |