<%
// I made a little RegEx hack on a Icecast server ver. 2.3.3
// im not sure if its working on other but it should be easy to rewrite to your type
// This is for a IIS server but it would not be a problem to make same against a Apache (PHP)
// Tyrone Fröberg – tyrfro@gmail.com
Function GetText(URI)
Dim Request
Set Request = CreateObject(”WinHttp.WinHttpRequest.5.1″)
Request.Open ”GET”, URI, False
Request.Send
GetText = Request.ResponseText
End Function
// REPLACE on found stuff
Function SONGNAME(s)
s = Replace(s,”Current Song:”,””) // replace from string
s = Replace(s,”</td>”,””) // replace from string
s = Replace(s,”<td>”,””) // replace from string
s = Replace(s,”\n”,””) // replace from string
s = Replace(s,”\r”,””) // replace from string
s = Replace(s,” ”,” ”) //if there is a misstake in rename file we clean it up a bit //
s = Replace(s, vbCrLf, ”” ) // replace from string (just in case)
s = Replace(s,”<td class=””streamdata””>”,” ”) // replace from string
s = Replace(s, Chr(13), ” ”) // replace from string (just in case)
SONGNAME = s
End Function
targetString = GetText(”http://www.domain.com:8000/”)
Dim re, targetString, colMatch, objMatch
Set re = New RegExp
With re
.Pattern = ”<td>Current Song:</td>\n<td class=””streamdata””>.*</td>”
.Global = False
.IgnoreCase = True
End With
Set colMatch = re.Execute(targetString)
For each objMatch in colMatch
SongArtist = SONGNAME(objMatch.Value)
Next
%>
<!– We put out song to a page that we can use a IFRAME to get in to what ever website u have, put some graphic stuff around it –>
<%=Trim(SongArtist)%>
*** END ***
I hope this can help someone else as well
http://www.tyrone.nu/program/icecast-airtime-now-playing/
It looks like you're new here. If you want to get involved, click one of these buttons!