unable to send URL out of Radioboss

Yes, Dimitri Post would be better and more reliable you could be correct about image size but they have not changed in size, and this did work on another website, but currently I am forced into picking up FTP XML and artwork.png which is working reading in PHP with a fetch timer from the website which gets over this but has to have website loaded This is reading from XMP. Something strange is happening with the output of the Setting>>FileType SID to exclude the image. It would be nice to have %lyrics created in this XML Play file?

<?php


// $remote_server is a returned value to check steam is active.
include "mp3/check_remote_server.php";
$remote_server = checkRemoteServerStatus(
"http://server.net:27757574/",
19200,
0
);


if ($remote_server == true) {
$xml=simplexml_load_file("images/nowplaying.xml");
if( $xml == false) {ReturnError(500, "Failed to open ("."images/nowplaying.xml".") bytes of XML from file XML.");}
//$artist= iconv( "UTF-8", "ISO-8859-1//TRANSLIT", $artist); //TO REMOVE THE ISO-8859-1 ISSUE
// print_r($xml);
$title = implode($xml->xpath('//PLAYER/TRACK/@TITLE'));
$artist = implode($xml->xpath('//PLAYER/TRACK/@ARTIST'));
$album = implode($xml->xpath('//PLAYER/TRACK/@ALBUM'));
$genre = implode($xml->xpath('//PLAYER/TRACK/@GENRE'));
$comment = implode($xml->xpath('//PLAYER/TRACK/@COMMENT'));
$bpm = implode($xml->xpath('//PLAYER/TRACK/@BPM'));
$length = implode($xml->xpath('//PLAYER/TRACK/@DURATION'));
$listeners =implode($xml->xpath('//PLAYER/TRACK/@LISTENERS'));
$rating = implode($xml->xpath('//PLAYER/TRACK/@RATING'));
$exit_old = false;
$xml = null; // clear the used class XML.
// note there is now num_rows in PDO so we have to calculate a new one to get record number.


try {
$n = 0;
$conn = new PDO( "mysql:host=$servername;dbname=$dbname", $username, $password );
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM `played_songs` ORDER BY `datetime` DESC LIMIT 1";
$result = $conn->query($sql); // Use query as we are returning records.

$row = $result->fetch();
$conn = null;
} catch (PDOException $e) {
ReturnError(500, "Failed to write /read from SQL." . $e->getMessage() );
}

if ($artist != $row['artist'] && $title != $row['song']) {
$exit_old = true;

$t = fopen("images/nowplaying_artwork_2.png", "r");
if ($t !== false) {
$artwork = fread($t, filesize("images/nowplaying_artwork_2.png"));
fclose($t);
} else {
fclose($t);
ReturnError(500, "Failed to write artwork to a file.");
}
$base64artwork = base64_encode($artwork);
$sql3 = "INSERT INTO `played_songs` (`song`, `artist`, `album`, `length`, `bpm`,`genre`, `listeners`,`track_user_rating`,`track_user_num`,`comment`,`ImageBase64`) VALUES ('$title','$artist', '$album', '$length', '$bpm', '$genre','$listeners','0','0', '$comment','$base64artwork') ON DUPLICATE KEY UPDATE `listeners`='$listeners'";
$conn= null;
$conn = new PDO( "mysql:host=$servername;dbname=$dbname", $username, $password );

$conn->exec($sql3);


/>
 
Last edited:
About FTP, it can upload both nowplaying.txt file and album cover. In the Nowplaying section (https://manual.djsoft.net/radioboss/en/http_request.htm) enable both "Save nowplaying.txt file" and "Save artwork" options, enable FTP and configure it, this should work.
Yes, but this description https://manual.djsoft.net/radioboss/en/http_request.htm does not fire upon ftp completion. You already know that it is not defined in your software. The page does not work with any internet site we have used as the new google servers block it. I have informed you this for several years. After trying five different sites they all do same thing block this transmission because of the variables. This is not passed to the site like it used to be. i.e. 000Webhost, iFastNet, epizy, ezyro and others. But then I already informed you this you added in XML to circumvent this. I was hoping you then make this redundant code do something fire when the FTP was finished and run a PHP without variables as they were being sent by XML through FTP. I had also hoped you realized sending things to the website twice was wasteful and would slow internet down if everyone did it. It would also cut down CPU processing on the webserver. You must be now aware we subscribe.

1710263104428.png


Does not function.
 
I can inform you we added code to php to only run if the file date had been altered:

Code:
<?PHP
$stat = stat("images/nowplaying.xml");
if($readtime != $stat["mtime"]) {
       readtime= $stat["mtime"];
} else exit();
/>


and still uses to much CPU oddly JavaScript is supposed to run in the browser. so why does it affect their CPu the only consideration e have is that the setInterval is doing something at server level via Ajax.Request(gCheckURL,{method:'get', onSuccess:CheckResponse}); You could circumvent this.
 
Last edited:
Yes, but this description https://manual.djsoft.net/radioboss/en/http_request.htm does not fire upon ftp completion.
It's not supposed to, it's fired on every track start.

The page does not work with any internet site we have used as the new google servers block it. I have informed you this for several years. After trying five different sites they all do same thing block this transmission because of the variables.
Variables can't be a problem, almost every HTTP request has parameters, this is how internet works.

and still uses to much CPU oddly JavaScript is supposed to run in the browser. so why does it affect their CPu the only consideration e have is that the setInterval is doing something at server level via Ajax.Request(gCheckURL,{method:'get', onSuccess:CheckResponse}); You could circumvent this.
I don't know what this is about and what this has to do with RadioBOSS I'm sorry.
 
Back
Top