Advertisement:

Author Topic: Radio script?  (Read 27409 times)

Offline webdude

  • Newbie
  • *
  • Posts: 3
  • Gender: Male
  • I'm a llama!
Radio script?
« on: September 28, 2003, 10:21:12 AM »
Is there any script out there that will randomly pull a mp3 file from a server, and play it in a media player?

I want to have an online station, and store the files on my sever and have a script on a page "radio.php" and for the script to call the mp3 and play it in the same window.

Is thta possiible?

Offline Metho

  • SMF Friend
  • Full Member
  • *
  • Posts: 564
  • Gender: Male
Re:Radio script?
« Reply #1 on: September 28, 2003, 10:35:37 AM »
Yes, quite simple, quite possible. If you do some quick reading on php and it's file functions you'd be quite surpised at how fast you could make a working example. :D

Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

Offline webdude

  • Newbie
  • *
  • Posts: 3
  • Gender: Male
  • I'm a llama!
Re:Radio script?
« Reply #2 on: September 28, 2003, 12:14:41 PM »
Cool thanks  :D

Does any one have a little example i could perhaps build upon? just to get me startred off?


Offline Bouminok

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,201
Re:Radio script?
« Reply #3 on: September 28, 2003, 12:20:09 PM »
so can this be done with playing around with fopen(); ?

Offline eFishie

  • The Anti-Llama
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,470
  • Gender: Male
  • Vibin' The Crook
    • The Abstraction Point
Re:Radio script?
« Reply #4 on: September 28, 2003, 01:01:20 PM »
I think I got an idea. Open a temp file, put all the MP3s in it, then use that temp file as an MP3 file. But the problem is how to play the file. :(
--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

Offline Bouminok

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,201
Re:Radio script?
« Reply #5 on: September 28, 2003, 01:03:02 PM »
if you open an mp3 doesn't it play anyways?

Offline Bouminok

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,201
Re:Radio script?
« Reply #6 on: September 28, 2003, 01:03:53 PM »
actually, couldnt you open a folder with the mp3s in, and use rand() to open a different file each time?

Offline eFishie

  • The Anti-Llama
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,470
  • Gender: Male
  • Vibin' The Crook
    • The Abstraction Point
Re:Radio script?
« Reply #7 on: September 28, 2003, 02:19:51 PM »
Maybe use file_get_contents() or file() ?

Use glob, then count the array items, open each, and add them into a super MP3.

Unknown?
--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

Offline Shadow

  • Sophist Member
  • *****
  • Posts: 1,005
  • Gender: Male
  • "Stuff some in your pockets for *secret eating*"
    • Edtl.us
Re:Radio script?
« Reply #8 on: September 28, 2003, 07:53:44 PM »
Is there any script out there that will randomly pull a mp3 file from a server, and play it in a media player?

I want to have an online station, and store the files on my sever and have a script on a page "radio.php" and for the script to call the mp3 and play it in the same window.

Is thta possiible?
Be extreamly careful when doing an internet radio. I'm not sure where you are or what the laws are outside of the United States, but within the United States there are a number of rules you have to follow, and likewise you have to pay a fee for having an internet radio station. Unless you're in Iraq or some other place without a full government there will be laws about this. Look into them.
Just do it, go Charter! [Unknown] offered me a spot on the dev team! I swear it!

"Sup foos'! I'm Marshie! Capital M and then arshie! I'm going this way!!!"

Offline eFishie

  • The Anti-Llama
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,470
  • Gender: Male
  • Vibin' The Crook
    • The Abstraction Point
Re:Radio script?
« Reply #9 on: September 28, 2003, 08:20:16 PM »
Pay a fee to develop PHP . . . sounds lame. Where are these rules (for the U.S.)? Does anybody care? Can anybody then download the songs?
--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

Offline Shadow

  • Sophist Member
  • *****
  • Posts: 1,005
  • Gender: Male
  • "Stuff some in your pockets for *secret eating*"
    • Edtl.us
Re:Radio script?
« Reply #10 on: September 28, 2003, 10:33:13 PM »
Pay a fee to develop PHP . . . sounds lame. Where are these rules (for the U.S.)? Does anybody care? Can anybody then download the songs?
No, pay a fee to run a radio station. The rules are at www.fcc.gov, I do not know if anybody cares but I do know the people who the FCC looked into cared. Why did they care? Because they lost money and faced jail time. This doesn't happen to everyone, but it is possible if you play music that is registered in the US copyright office.
Just do it, go Charter! [Unknown] offered me a spot on the dev team! I swear it!

"Sup foos'! I'm Marshie! Capital M and then arshie! I'm going this way!!!"

Offline Tyris

  • Sophist Member
  • *****
  • Posts: 1,306
  • Gender: Male
    • Shana Project
Re:Radio script?
« Reply #11 on: September 28, 2003, 10:36:10 PM »
what if you get permission from each of the artists involved? do you have to pay then...?

Offline David

  • Destroyer Dave
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,928
  • Gender: Male
    • David Recordon
Re:Radio script?
« Reply #12 on: September 28, 2003, 11:16:58 PM »
what if you get permission from each of the artists involved? do you have to pay then...?
Ask a lawyer but I believe so.
This space for rent.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re:Radio script?
« Reply #13 on: September 28, 2003, 11:36:45 PM »
As far as copyright law goes, I'd say yes... but, no.

You will never get permission because by their contracts I think the RIAA has to say yes and they simply will not.

-[Unknown]

Offline Tyris

  • Sophist Member
  • *****
  • Posts: 1,306
  • Gender: Male
    • Shana Project
Re:Radio script?
« Reply #14 on: September 28, 2003, 11:41:36 PM »
that seems kinda stupid.. what if you ARE the artist... shouldn't you have the write to broadcast your songs over the internet or give permission to others to do so...?
meh... so many laws are stupid like that these days :'(

Offline webdude

  • Newbie
  • *
  • Posts: 3
  • Gender: Male
  • I'm a llama!
Re:Radio script?
« Reply #15 on: September 29, 2003, 08:35:27 AM »
that seems kinda stupid.. what if you ARE the artist... shouldn't you have the write to broadcast your songs over the internet or give permission to others to do so...?
meh... so many laws are stupid like that these days :'(

The band "The Offspring" tried to do that in 2001 by publishing all of there full lenght albums on their site, however there record company threatend to take them to court and drop them from the label. Now thy just have the individual songs on there site.

Offline Deadairdave

  • Semi-Newbie
  • *
  • Posts: 33
Re: Radio script?
« Reply #16 on: October 27, 2007, 05:13:37 PM »
I'm an unsigned artist; and I also work in a Radio studio.  There's no laws to stop 'unsigned' artists' from uploading their own material for free download (or purchase), or to stream on their own site or somebody elses.

If your music is 'signed' to a label or bound by another contract, you have to seek permission if you intend to upload your music whether free or by payment for others to download/stream.  Failure to do so, as mentioned above, can void your contract and land you in hot water.

As also said above, allowing others to stream 'signed' music by other artists' without their knowledge or permission, or company that owns the rights to their music, can land you in court and have you pay a fine; and in worse case scenario, have you sent to prison!  If you broadcast internet radio in the UK you fall under the PRS and MCPS (search Google) alliance, were royalties and yearly fees to one or both companies is required.  As far as I'm aware, RIAA and BMI is the two companies that cover the USA.  Other EU companies have similar systems in place that require some form of yearly payment.

The royalty payments for the internet are nuts in my opinion.  You pay a certain amount per song, per listener, but it usually works out as a lump sum yearly payment.  All songs you stream per day should also be logged (up to 6 months) in the event that someone from one of these licensing companies asks what has been streamed in a given month.

You can save yourself some grief and use a stream service (pay monthly), then stick a link to the service on your site - http://www.streamsolutions.co.uk/

There's different services available in the above site, but if you want to go it alone, then you can use this service - http://www.shoutcast.com/download/

I've used the phpbb add-on to broadcast the shoutcast (winamp) radio service in the past.  I've only switched to SMF in the last couple of days (love it) from using phpbb2 previously. 

Just out of interest, is there an add-on similar to the phpbb2 shoutcast add-on for internet radio, but for SMF?

D.