diff --git a/id.php b/id.php index 0bfa3a5..06acc2f 100644 --- a/id.php +++ b/id.php @@ -8,8 +8,7 @@ function getIDshout($radioip,$radioport,$postfix = "GET /7.html HTTP/1.1\nUser-A $read = fread($open,255); $exploded = explode(",",$read); if ($exploded[6] == '' || $exploded[6] == '') { - $text = 'streaming'; } else { $text = $exploded[6]; - } + $text = 'streaming'; } else { $text = $exploded[6]; } $id = str_replace("","",$text); } else { return false; } fclose($open); @@ -43,22 +42,33 @@ function getIDice($streamingUrl, $interval, $offset = 0, $headers = true) { } else throw new Exception("Unable to open stream [{$streamingUrl}]"); } +// Anima Amoris +function getIDanima($amoris) { + $url = "http://amoris.sknt.ru/sc/".$amoris."/stats.json"; + $headers = array('User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0'); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + $data = curl_exec($ch); + curl_close($ch); + $data = json_decode($data, true); + if (!empty($data)) $data = $data["songtitle"]; + if (substr($data, -7) == "sknt.ru") $data = stristr($data, " * anima.sknt.ru", true); + return $data; +} // first echo "id:;:"; try { - $firststr = getIDshout("93.100.18.126","8000"); // Anima Amoris [DubTech Mix] - if (substr($firststr, -7) == "sknt.ru") echo stristr($firststr," * anima.sknt.ru",true); - else echo $firststr; + echo getIDanima("3"); // Anima Amoris [DubTech] } catch (Exception $exfirst) { echo "unavailable"; } // second echo ":;:"; try { - $secondstr = getIDshout("93.100.18.126","8024"); // Anima Amoris [DubTech Mix] - if (substr($secondstr, -7) == "sknt.ru") echo stristr($secondstr," * anima.sknt.ru",true); - else echo $secondstr; + echo getIDanima("15"); // Anima Amoris [DubTech Mix] } catch (Exception $exsecond) { echo "unavailable"; } @@ -79,9 +89,9 @@ try { // fifth echo ":;:"; try { - getIDice("http://94.130.113.214:8000/dubtechno", 19200); // Schizoid Dub Techno - if ($getIDice = "ÿþf - ÿþR") echo "online streaming"; - else echo $getIDice; + $fifthIDice = getIDice("http://94.130.113.214:8000/dubtechno", 19200); // Schizoid Dub Techno + if (bin2hex($fifthIDice) == "fffe66202d20fffe52") echo "online streaming"; + else echo $fifthIDice; } catch (Exception $exfifth) { echo "unavailable"; } @@ -116,7 +126,7 @@ try { // tenth echo ":;:"; try { - echo getIDshout("2.58.194.54","8852"); // Deep Planet on MixLive.ie + echo getIDanima("8"); // Anima Amoris [MinimalDeepTech] } catch (Exception $extenth) { echo "unavailable"; } diff --git a/index.html b/index.html index ec9df59..19fdaaa 100644 --- a/index.html +++ b/index.html @@ -98,9 +98,9 @@ a8" `Y88 88 88 88P' "8a 88 a8P_____88 a8" "" 88P' "8a
-
Deep Planet on MixLive.ie
-
http://mixlive.ie:8852
- +
Anima Amoris [Deep Techno]
+
http://amoris.sknt.ru:8010
+