RadioDJ - Free Radio Automation Software Forum

Sending Album Art from RadioDJ to Webserver

Sending Album Art from RadioDJ to Webserver
« on: June 03, 2020, 06:21:05 PM »
Howdy.

For starters, I'm totally unfamiliar with the PHP world. My problem is difficult to describe.

Anyway, I used Marci for Shoutcast in order to display album art on my website. Problem is, I had to manually upload exact matches as Marci pulled totally weird stuff 9 out of 10 times.

I'd like to send album art from RadioDJ to my website. I read the tutorial Capt. Fuzzy put together; however, once I upload the album art and files to the server, I'm unsure how I would go about getting the Now Playing info to show up on my site. Does this involve HTML code that pulls from the folder I stuffed the files and images in?

Help!

Thanks.
« Last Edit: June 03, 2020, 08:10:46 PM by pfoole2012 »

Offline Chip Douglas Mosley

  • ****
  • 431
  • Retired disc jockey and radio programmer
    • Jukebox 92.7 WEPQ
Re: Sending Album Art from RadioDJ to Webserver
« Reply #1 on: June 03, 2020, 07:56:52 PM »
Following.
Chip Douglas Mosley
Jukebox 92.7 WEPQ
www.jukebox927.com
Radio DJ user since 2016, Live365 since 2019
Now using v2.0.2.0 since January 19, 2020

Offline EmmaS

  • **
  • 93
  • I don't fail... I find ways that don't work.
    • StewartsWebWorks
Re: Sending Album Art from RadioDJ to Webserver
« Reply #2 on: June 03, 2020, 09:57:51 PM »
I'd like to send album art from RadioDJ to my website. I read the tutorial Capt. Fuzzy put together; however, once I upload the album art and files to the server, I'm unsure how I would go about getting the Now Playing info to show up on my site. Does this involve HTML code that pulls from the folder I stuffed the files and images in?
Firstly you'd need your album art on your webserver so you'd need to FTP the folder up to where your website is.
Then you need server side scripting to get the song info eg: php / javascript.
With RadioDJ you can get the current song info from the history table...
Use an SQL Query and gather the information into variables

Code: [Select]
$query = ($conn, "SELECT * FROM `history` WHERE `song_type`='0' ORDER BY `date_played` DESC LIMIT 1");
while($row = mysqli_fetch_array($query, MYSQLI_ASSOC)){
$artist = $row["artist"];
$title = $row["title"];
$image = $row["image"];
}
etc etc etc

Then with php you echo out where in your page you want to display the info

<?php echo $artist; ?>

<img src="<?php echo $image; ?>" />
XperienceRewind.co.uk - 70s and 80s None Stop
https://www.xperiencerewind.co.uk/

XperienceRadio.co.uk - Club Dance & Trance
https://www.xperienceradio.co.uk/