So i have this script right here to get data from shoutcast
$fp = @fsockopen("$host", $port, &$errno, &$errstr, 30);
fputs($fp,"GET /admin.cgi?pass=jkl&mode=viewxml HTTP/1.0
User-Agent: XML Getter (Mozilla Compatible)
");
echo '<pre>';
while(!feof($fp)) {
echo fgetss($fp);
}
fclose($fp);
Problem is that the data i get is all in one line.. if i try something like this
echo fgetss($fp) . '<BR>';
But it doesn't work..it just echos out
on the HTTP/1.0 200 OK Content-Type:text/xml lines..
I'd like if possible to put the data in an array so i can echo-it out nicely OR echo it out ,but also echo it with the xml thing which is in <> so i know what that value actually represents
This is the only method that works with shoutcast to get data.. so don't tell me to use curl because it just doesn't work..