A new script is available: https://www.djsoft.net/smf/index.php/topic,6352.0.html
Guide: how to show playing track title on a web page.
Quick Setup:
1. Download the attached track_title.zip file and put its contents to your web site's root folder.
2. Open RadioBOSS, open Settings->Reports/Now playing
3. Add a new HTTP request, enter URL: http://your-web-site.com/httpreq.php?artist=%artist&title=%title and click OK.
4. Check the "Use HTTP request" option, click OK.
Testing:
Start any track in the playlist and visit http://your-web-site.com/showtitle.htm - track title should be displayed on the web page.
To display title on a custom web page, copy-paste the code contained between <!-- begin update track title code --> and <!-- end update track title code --> tags from showtitle.htm.
Manual setup without using the supplied .zip archive:
1) First of all you'll need a script to receive info from RadioBOSS. Create it and upload it onto your web site. In this example the script is called httpreq.php
Script source code:
When RadioBOSS calls this script via HTTP Request feature, it will create temp_title.txt file where track information is stored.
* if file is not created, create it with any FTP client and set its rights to 777.
2) In RadioBOSS open Settings->Reports, check "Use HTTP request" option, click "+" to add new request and enter URL of your script and request parameters. For example:
As you see it sends %artist and %title information.
More about HTTP request and its parameters: http://manual.djsoft.net/radioboss/en/http_request.htm
3) Web page example to show track information - title.html:
It just reads the temp_title.txt file and shows this info on a page. Title is updated every 1000ms (1 second). Track title updated without page reload.
Guide: how to show playing track title on a web page.
Quick Setup:
1. Download the attached track_title.zip file and put its contents to your web site's root folder.
2. Open RadioBOSS, open Settings->Reports/Now playing
3. Add a new HTTP request, enter URL: http://your-web-site.com/httpreq.php?artist=%artist&title=%title and click OK.
4. Check the "Use HTTP request" option, click OK.
Testing:
Start any track in the playlist and visit http://your-web-site.com/showtitle.htm - track title should be displayed on the web page.
To display title on a custom web page, copy-paste the code contained between <!-- begin update track title code --> and <!-- end update track title code --> tags from showtitle.htm.
Manual setup without using the supplied .zip archive:
1) First of all you'll need a script to receive info from RadioBOSS. Create it and upload it onto your web site. In this example the script is called httpreq.php
Script source code:
Code:
<?php
//get artist/title info
$artist = $_GET['artist'];
$title = $_GET['title'];
//create a temp file to store values for AJAX script
$r = fopen("temp_title.txt", "w");
fwrite($r, $artist." - ".$title);
fclose($r);
?>
* if file is not created, create it with any FTP client and set its rights to 777.
2) In RadioBOSS open Settings->Reports, check "Use HTTP request" option, click "+" to add new request and enter URL of your script and request parameters. For example:
Code:
http://example.com/httpreq.php?artist=%artist&title=%title
More about HTTP request and its parameters: http://manual.djsoft.net/radioboss/en/http_request.htm
3) Web page example to show track information - title.html:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<b>Here you'll see track title:</b>
<!-- begin update track title code -->
<div id="track_name"></div>
<script type="text/javascript">
function UpdateTitle()
{
var xmlhttp;
//get "track name" block
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var s = xmlhttp.responseText;
document.getElementById('track_name').innerHTML = s;
}
}
//use random number in request to prevent caching
var rand_no = Math.random();
rand_no = rand_no * 100;
//read the "temp_title.txt" file
xmlhttp.open("POST", "/temp_title.txt?"+rand_no, true);
xmlhttp.send();
}
//
setInterval("UpdateTitle()", 1000);
UpdateTitle();
</script>
<!-- end update track title code -->
</body>
</html>