I am working on a website for a radiostation. I can get the tracks that are playing at the moment from the following code:
<span data-widget="mcp-custom-text" data-name="NAMEOFSTATION" data-format="%nowplaying%"></span></b>
<script type="text/javascript" language="javascript" src="https://NAMESERVER.nl:2020/dist/widgets.js" defer></script>
And I got a radioplayer which shows the text that you want in it, the following code is the part where it displays the text that you want to show in the player:
$the_link=trim($_GET['the_stream']);
$t = new streaminfo($the_link);
$songtitle=strip_tags($t->streamtitle);
if (trim($songtitle)=='' || trim($songtitle)=='-') {
$songtitle="SHOW HERE SONGTITLE";
}
echo trim($songtitle);
}
?>
How can I get the data of the first code on the position in the player? Because just paste the HTML code in the PHP variable doesn't work.