<%
extURL = "http://91.121.6.109:8024/admin.cgi?pass=gtdn2nite&mode=viewxml"
set xmlDoc = createObject("Msxml.DOMDocument")
xmlDoc.async = false
xmlDoc.setProperty "ServerHTTPRequest", true
xmlDoc.load(extURL)
playtime = ""
If (xmlDoc.parseError.errorCode <> 0) then
ShowCurrentSong = "Song Title Currently Not Available"
Else
ServerStatus = xmlDoc.SelectSingleNode("//STREAMSTATUS").text
If serverstatus = "1" Then
StationName = xmlDoc.SelectSingleNode("//SERVERTITLE").text
BitRate = xmlDoc.SelectSingleNode("//BITRATE").text
ServerVersion = xmlDoc.SelectSingleNode("//VERSION").text
MediaType = xmlDoc.SelectSingleNode("//CONTENT").text
CurrentSong = xmlDoc.SelectSingleNode("//SONGTITLE").text
If instr(CurrentSong,"-") > 0 Then
ShowCurrentSong = CurrentSong
End If
Users = xmlDoc.SelectSingleNode("//CURRENTLISTENERS").text
' Not doing anything with this info at the moment
MaxUsers = xmlDoc.SelectSingleNode("//MAXLISTENERS").text
' Not doing anything with this info at the moment
Set UserList = xmlDoc.SelectNodes("//LISTENER")
' Not doing anything with this info at the moment
Set SongHistory = xmlDoc.SelectNodes("//SONG")
For Each Song In SongHistory
If NOT Song.SelectSingleNode("TITLE").text = CurrentSong Then
ThisSong = Song.SelectSingleNode("TITLE").text
History = History & thissong & "
"
End If
Next
For Each User In UserList
ConnectedUsers = ConnectedUsers & User.SelectSingleNode("HOSTNAME").text & "
"
Next
' Not doing anything with this info at the moment either...lol
Else
ShowCurrentSong = "Currently Off The Air"
End If
End If
' Test output
response.write "" & ShowCurrentSong & ""
%>