• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Now Playing:

JaySann

New Member
Does anyone know how to get the HTML for when you are on air, it will display the song title to your site..
 
You can't use HTML to do this.

You will have to use PHP with socket() functions to connect to the radio server & port, then send and receive information to get the song title.

Unless your radio host has some sort of code you can copy to show the song title.
 
Try this out i use this on some sites
<div style="Visibility: Hidden; Position: Absolute;">
<?
$open = fsockopen("server ip here","port here");
if ($open) {
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n");
$read = fread($open,1000);
$text = explode("content-type:text/html",$read);
$text = explode(",",$text[1]);
} else { $er="Connection Refused!"; }
?>
</div>
<?
if ($text[1]==1) { $state = "Up"; } else { $state = "Down"; }
if ($er) { echo $er; exit; }
echo "<font face=verdana size=1>
Server State: <b>$state</b><br>
Bitrate: $text[5] Kbps<br>
Current Song: $text[6]<br>
Stream Status:$text[4]
</font>";?>
 
Back
Top