Nice PHP script
Thanks!
Results 1 to 6 of 6
-
01-17-2014, 08:11 AM #1
SHOUTcast Song title PHP code
PHP Code:<?php
$ip = "YOUR IP ADDRESS HERE";
$port = "YOUR PORT NUMBER HERE";
$fp = @fsockopen($ip,$port,$errno,$errstr,1);
if (!$fp) {
$title = "Connection timed out or the server is offline ";
} else {
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp)) {
$info = fgets($fp);
}
$info = str_replace('</body></html>', "", $info);
$split = explode(',', $info);
if (empty($split[6])) {
$title = "The current song is not available ";
} else {
$count = count($split);
$i = "6";
while($i<=$count) {
if ($i > 6) {
$title .= ", " . $split[$i];
} else {
$title .= $split[$i];
}
$i++;
}
}
}
$title = substr($title, 0, -2);
print $title;
?>Last edited by MarcAlle; 01-19-2014 at 03:54 PM.
SHOUTcast Hosting | Cheap Shoutcast Streaming | ICEcast Hosting |
Money-Back Guarantee | Unlimited Bandwidth|
Radio Cast | Your Stream Solution|
-
01-19-2014, 07:11 AM #2
-
01-20-2014, 11:17 PM #3
- Title
- Junior Member
- Join Date
- Jan 2014
- Location
- United Kingdom
- Posts
- 20
- Rep Power
- 6
Does this only work with SHOUTcast V1? Considering I suppose for V2 you'd have to provide the sID etc?
-
01-21-2014, 09:38 AM #4SHOUTcast Hosting | Cheap Shoutcast Streaming | ICEcast Hosting |
Money-Back Guarantee | Unlimited Bandwidth|
Radio Cast | Your Stream Solution|
-
01-21-2014, 09:41 PM #5
- Title
- Junior Member
- Join Date
- Jan 2014
- Location
- United Kingdom
- Posts
- 20
- Rep Power
- 6
Ah fantastic, did you write the code or is it from the internet?
-
04-22-2019, 01:58 AM #6
- Title
- Junior Broadcaster
- Join Date
- Apr 2019
- Posts
- 1
- Rep Power
- 0
How to use the same to show the music cover the photo of the singer
this really only works with SHOUTcast V1
Mostre-me como funciona com o SHOUTcast v2 também?Last edited by MarcAlle; 05-02-2019 at 03:54 AM.
Bookmarks