News:

Wondering if this will always be free?  See why free is better.

Main Menu

Radio script?

Started by webdude, September 28, 2003, 10:21:12 AM

Previous topic - Next topic

webdude

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?

Metho

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

webdude

Cool thanks  :D

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


bostasp

so can this be done with playing around with fopen(); ?

eFishie

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

bostasp

if you open an mp3 doesn't it play anyways?

bostasp

actually, couldnt you open a folder with the mp3s in, and use rand() to open a different file each time?

eFishie

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

Shadow

Quote from: webdude 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?
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!!!"

eFishie

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

Shadow

Quote from: ?php Piranha ? 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?
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!!!"

Tyris

what if you get permission from each of the artists involved? do you have to pay then...?

David

Quote from: Tyris 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...?
Ask a lawyer but I believe so.
This space for rent.

[Unknown]

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]

Tyris

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 :'(

webdude

Quote from: Tyris 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 :'(

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.

Deadairdave

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.

Advertisement: