1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
|
<?
header("content-type:text/html; charset=utf-8");
$host = "85.214.237.251";
$port = 9080;
$fp = fsockopen ($host, $port, &$errno, &$errstr, 5);
$radio = array();
if (!$fp) {
$radio['status'] = FALSE;
}
else {
$radio['quelle'] = "http://".$host.":".$port."/listen.pls";
fputs($fp, "GET /index.html HTTP/1.0\r\nUser-Agent: XML Graaaaabber (Mozilla Compatible)\r\n\r\n");
while (!feof($fp)) {
$stream = fgets($fp, 9080);
}
fclose($fp);
$stream = strip_tags($stream);
$stream = strtr($stream, array(" " => " ", "N/A" => ""));
$stream = htmlentities($stream);
preg_match_all("`Server Status:(.+?)Stream Status: Stream is up at(.+?)kbps with(.+?)of(.+?)listeners \((.+?)unique\)Listener Peak:(.+?)Average Listen Time:(.+?)Stream Title:(.+?)Content Type:(.+?)Stream Genre:(.+?)Stream URL:(.+)Stream AIM:(.+?)Stream IRC:(.+?)Current Song:(.+?)Written by`i", $stream, $treffer, PREG_SET_ORDER);
$radio['status'] = trim($treffer[0][1]);
$radio['bitrate'] = trim($treffer[0][2]);
$radio['hoerer'] = trim($treffer[0][3]);
$radio['max_hoerer'] = trim($treffer[0][4]);
$radio['eindeutige_hoerer'] = trim($treffer[0][5]);
$radio['hoerer_spitze'] = trim($treffer[0][6]);
$radio['schnitt_hoerzeit'] = trim($treffer[0][7]);
$radio['sendung'] = trim($treffer[0][8]);
$radio['kodierung'] = trim($treffer[0][9]);
$radio['genre'] = trim($treffer[0][10]);
$radio['url'] = trim($treffer[0][11]);
if (!empty($radio['url']) && !(eregi('(^http[s]*:[/]+)(.*)', $radio['url']))) $radio['url'] = "http://".$radio['url'];
$radio['aim'] = trim($treffer[0][12]);
$radio['irc'] = trim($treffer[0][13]);
$radio['titel'] = trim($treffer[0][14]);
# return $radio;
}
if (!$radio['status']) {
$BildStatus = 'http://new-energy-board.co.de/wbb2/radioanzeige/radio-offline-hg.png';
}else{
$BildStatus = 'http://new-energy-board.co.de/wbb2/radioanzeige/radio-online-hg.png';
};
if ($radio['sendung'] == "Dreamstation Radio") {
$diskj = utf8_encode(html_entity_decode("Auto DJ"));
#$diskj = "Auto DJ";
}else{
$diskj = $radio['sendung'];
$diskj = utf8_encode(html_entity_decode("$diskj"));
$pos1 = strpos($diskj, "(");
$pos2 = strpos($diskj, ")");
}
$Zeile1 = utf8_encode(html_entity_decode("Aktueller Titel:"));
If (strlen($Zeile1) > 120) $Zeile1 = substr($Zeile1,0,120);
$Zeile2 = utf8_encode(html_entity_decode("<b>$radio[titel]</b>"));
$Zeile3 = utf8_encode(html_entity_decode("Momentan"));
$Zeile4 = utf8_encode(html_entity_decode("<b>$radio[hoerer]</b>"));
$Zeile5 = utf8_encode(html_entity_decode("Hörer auf"));
$Zeile6 = utf8_encode(html_entity_decode("<b>Dreamstation-Radio</b>"));
$Zeile7 = utf8_encode(html_entity_decode(""));
$Zeile8 = utf8_encode(html_entity_decode("Stream läuft mit "));
$Zeile9 = utf8_encode(html_entity_decode("<b>$radio[bitrate]</b>"));
$Zeile10 = utf8_encode(html_entity_decode(" kbps | Maximale Höreranzahl: "));
$Zeile11 = utf8_encode(html_entity_decode("<b>$radio[max_hoerer]</b>"));
$Zeile12 = utf8_encode(html_entity_decode(" | Zuhörer - Record: "));
$Zeile13 = utf8_encode(html_entity_decode("<b>$radio[hoerer_spitze]</b>"));
$Zeile14 = utf8_encode(html_entity_decode("<b>Moderator: $radio[aim]</b>"));
$output='
<table border="0" width="100%" height="100%" background="'.$BildStatus.'">
<tr>
<td><br /><br />
<p align="center"><font style="font-size: 13pt;" color="#00e400">
<span class="smallfont"><b>.::'.$diskj.'::.</b></span>
<p align="center"><font style="font-size: 11pt;" color="#00e400">
<span class="smallfont"> '.$Zeile14.'</span>
</td>
<!-- Zeile mit Noten -->
<tr>
<td nowrap height="25">
<p align="center"><font color="#FFCC33"><span class="smallfont">
<font style="font-size: 10pt;">
'.$Zeile1.'
<font color="#f40000"><span class="smallfont">
<font style="font-size: 10pt;">'.$Zeile2.'
<font style="font-size: 12pt;"></font></span>
</td>
</tr>
<!-- Momentane Zuhörer -->
<tr>
<td nowrap height="10">
<p align="center">
<span class="smallfont"><font style="font-size: 10pt;" color="#FFCC33">'.$Zeile3.'</font>
<font color="#f40000"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile4.'</font>
<font color="#FFFF00"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile5.'</font>
<font color="#f40000"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile6.'</font>
<font color="#FFFF00"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile7.'</font>
</span></td>
</tr>
<!-- streaminfo -->
<tr>
<td nowrap height="20">
<p align="center">
<font color="#FFCC33">
<span class="smallfont"><font style="font-size: 8pt;">
</font></span><font style="font-size: 9pt;"><span class="smallfont">'.$Zeile8.'
<font color="#f40000"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile9.'</font>
<font color="#FFFF00"><span class="smallfont"><font style="font-size: 9pt;">'.$Zeile10.'</font>
<font color="#f40000"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile11.'</font>
<font color="#FFFF00"><span class="smallfont"><font style="font-size: 9pt;">'.$Zeile12.'</font>
<font color="#f40000"><span class="smallfont"><font style="font-size: 10pt;">'.$Zeile13.'</font>
</span>
</font></td>
</tr>
<tr>
<td nowrap>
<p align="center">
<span class="smallfont"><font style="font-size: 8pt;">
<font color="#FFFFFF"> </font><a href="http://www.dreamstation-radio.de" target="_blank"><font color="#FFFFFF"><img src="http://new-energy-board.co.de/wbb2/radioanzeige/home.png" width="97" height="30" border="0" alt="Zur Radio-Page" title="Zur Radio-Page" /></font></a><a href="http://www.dreamstation-radio.de/sendeplan.php" target="_blank"><font color="#FFFFFF"><img src="http://new-energy-board.co.de/wbb2/radioanzeige/sendeplan.png" width="87" height="30" border="0" alt="Zum Sendeplan" title="Zum Sendeplan" /></font></a><a href="http://www.dreamstation-radio.de/infusions/gr_radiostatus_panel/gr_radiostatus_player.php?typ=gb&id=4" target="_blank"><font color="#FFFFFF"><img src="http://new-energy-board.co.de/wbb2/radioanzeige/wunschbox.png" width="130" height="30" border="0" alt="Zur Wunsch und Gruß Box" title="Zur Wunsch und Gruß Box" /><a href="http://www.powerphpchat217.de/chatlogin.php" target="_blank"><font color="#FFFFFF"><img src="http://new-energy-board.co.de/wbb2/radioanzeige/chat.png" width="84" height="30" border="0" alt="Chat" title="Chat" /></font></a><font color="#FFFFFF">
</font>
</font></span></td>
</tr>
</table>
';
echo $output;
?> |