bubble: nicht funzende Live-Demo

Beitrag lesen

Stream-URL: http://login.streamplus.de/app.php/shoutcast/public/playlist/download/22117.m3u

Stimmt nicht, das ist die Datei wo die Stream-URL drin steht.

Dadurch auch folgendes kein Wunder mehr:

Es wird ausgegeben: Radio Offline.
Stimmt nicht, im Programm Audacious läuft es.

Audacious weiß auch was es mit der m3u-Datei machen soll ;)

Hier mal nen Code-Fetzen um zum Stream zu verbinden:

  
$stream_info = file_get_contents("http://login.streamplus.de/app.php/shoutcast/public/playlist/download/22117.m3u");  
if($stream_info) {  
    $addr = null;  
    $stream_info = explode("\n", trim(str_replace("\r\n", "\n", $stream_info)));  
    foreach($stream_info as $line) {  
        if($line[0] != '#') {  
            $data = null;  
            if(preg_match('~^(http[s]?://|)(.+):(\d+)$~i', $line, $data)) { // Sollte noch verbessert werden, wollt mir jetzt nich die m3u-Spec angucken  
                $addr = array($data[2], intval($data[3]));  
                break;  
            }  
        }  
    }  
    if(!$addr) {  
        echo "Failed! Stream address not found.";  
    }  
    else {  
        $errno = null;  
        $errstr = null;  
        $sock = fsockopen($addr[0], intval($addr[1]), $errno, $errstr);  
        if(!$sock) {  
            echo '[', $errno, ']: ', $errstr;  
        }  
        else {  
            // Kram auslesen  
            fclose($sock);  
        }  
    }  
}  

MfG
bubble

--
If "god" had intended us to drink beer, he would have given us stomachs. - David Daye