[Web site] Song request demo script

bfmradio said:
Is it possible to apply some filters for listeners:

number of allowed requests per hour and no more than X requests per day (ip based)

Is there a way to make a way for listeners to search for a song before they request it?
Everything is possible - this script is just an example, and only has the basic features. You can add whatever new features you need to it.
 
Song request script was updated. Now it uses cURL instead of file_get_contents to communicate with RadioBOSS. This allows the script to work on hosts where file_get_contents is not permitted to access URLs.
 
Last edited:
Seeing that this is difficult for most, let me ask "How are you handling manual requests"? I am able to make a selection and place it in cue, butit seems to mess up the playlist..
 
Seeing that this is difficult for most, let me ask "How are you handling manual requests"? I am able to make a selection and place it in cue, butit seems to mess up the playlist..
Yes, integrating the script requires technical knowledge or hiring someone to do the job. Once integrated, the requests are handled automatically.
 
Nothing prevents you from creating any kind of song request script. RadioBOSS has API that allows receiving a list of all music track in the library, make and manage song requests etc. We will consider improving this example song request script, but typically things like this are fully custom - so the best option is to hire a developer who will do this for you, the way you need it.
 
Um I placed this on our website but how do you refer to your Radioboss as it needs to be accessible from the net

what are
$rb_server = '127.0.0.1'; //RadioBOSS hostname or IP
$rb_port = '9000'; //RadioBOSS port
$rb_password = '7bNR5UK'; //API password

This is not going to work as it needs my machine address on the net. On other website things there is a box on the web port access that discloses the port online why can't you configure something like this? This is also going to be a problem as computers change ip address
 
Also I note that Stereo_tool has remote control that works in local net but have not got it working without local wifi . I t has a useful tool you might like to look at when building yours
 
hello,
I think the php script "songrequest.php" provided has some problems.
In practice, if I create the complete list manually from the browser, the thing works.

Song request example:

h t t p://192.168.1.106:9001/?pass=JOWHjWTqdH&action=songrequest&filename=C:\Users\XXXX\Desktop\RADIO\AUDIO\MUSIC\elviso%20presley%20-%20trouble.mp3&message=hello%20Elvis

example displays my library:

h t t p://192.168.1.106:9001/?pass=JOWHjWTqdH&action=library&filename=my_music

if I do the request through the form in the PHP script instead, I will return this error

"Song request failed: unable to load music library."

my php file settings:

// details to connect to RadioBOSS API
$ rb_server = '192.168.1.106'; // RadioBOSS hostname (IP)
$ rb_port = '9001'; // RadioBOSS port
$ rb_password = 'JOWHjWTqdH'; // Password API
// music library name (omitting the .xml extension, the library is loaded from
$ rb_library = 'my_music';


where am I wrong? where is the script wrong?

because I manually manage to access my xml list on my computer and through php form I can not access it ?? so I suppose it's the wrong php code !!!
You are using local IP address not ones from the internet hence your PHP can't find the server. Its just not as easy as that
 
This is not going to work as it needs my machine address on the net. On other website things there is a box on the web port access that discloses the port online why can't you configure something like this? This is also going to be a problem as computers change ip address
If you run RadioBOSS on your own computer, you either need a static IP address, or have Dynamic DNS configured. If you also connect using router, you may also need to setup port forwarding.
 
Well with me it works perfect. Made on my local server 2 datababases for testing.
First it dit not work, he said no database found, though I made one. After searching I figured out that after I openend a library from the Musiclibrary it worked.
I tested all 3 forms of Databases Apev2", SLQlite , Mysql, uploaded the script to my Webhoster, intergratet it in my website per Iframe, opened local port to Radioboss and for MYSQL 3306, everything worked.

Wishes, I am unfortunately not a programmer in PHP.
After searching, only show result he found and then pick one song by hitting a button and add it to Radioboss, not immediately add it to the request songs in Radioboss.
Search possible only by Artist, or part of name/title with results and to pick out one song, not case sensitive.

For example, in wanted toe hear a sond From Gary Wright - Deram Weaver. But I Did not know exactely how to wright it. So i tried Dreamweaver, of course he could not find it. Nice here would be listening all song titles wich contents for example "Dream".
Another issue I would Like, is that he only look in a certain category which is playing in that hour, because its not nice if you have an hour with Disco music and someone wishes a hard rock song which does not fit in the hour playing at this time.

This would be perfect
 
You can modify the part where it compares artist/title to allow partial match. A freelancer can be hired for the job, it's 10 minutes work.
 
Hello, I have created an Alpha version plugin on github to be able to enter the song request in our wordpress. At the moment it is very in the initial phase but I think that together we can create a plugin that is easy and useful for everyone to use.


If someone is encouraged to lend a hand, do not hesitate.
 
Back
Top