|
|
#1 |
|
Junior Member
|
Serverstatus with ASP
Hey, i couldn't find a nice serverstatuspage built in ASP, only PHP.. So i built one myself, i might aswell share it with you guys.. Get it here
|
|
|
|
|
|
#2 |
|
Junior Member
|
I thank you very much for this script, which I could never find anywhere. It's simple and works as I wanted. Tested on my local asp enabled server.
![]() Hopefully it will be working soon on my ISP server. The technician seemed to forget my request for an asp enabled web space. Still I cannot complain as they are hosting my website for free even though I have an internet connection with someone else. My Website which is still under-going heavy construction and is not officially open yet - www.astrolabs.org tks, Kevin |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Feb 2003
Location: ATL, of course.
Posts: 724
|
Isn't there an ASP (Java?) "now playing" in the radio tools? This could use a FesterBot. ;-)
rg. |
|
|
|
|
|
#4 |
|
Forum Loser
(Forum King) |
thanks!!! Great stuff! Whats a festerbot?
|
|
|
|
|
|
#5 |
|
Senior Member
|
Does anybody know how to get this thing to work?
The PC Radio Network: An upbeat variety of the 50s-Today! |
|
|
|
|
|
#6 |
|
Forum Loser
(Forum King) |
if it can pull xml data, yes I would say there are asp tools, but I'm not a asp guy
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jul 2003
Posts: 19
|
I looked at this and I said Screw it...
Do you think I could get someone to fonfig it for me? Pretty please? |
|
|
|
|
|
#8 |
|
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
No.
|
|
|
|
|
|
#9 |
|
Forum Loser
(Forum King) |
lol
|
|
|
|
|
|
#11 |
|
Junior Member
|
Yeah, sorry bout that.. I forgot you guys
|
|
|
|
|
|
#12 |
|
Senior Member
|
Well, this is cool, but after I changed the server name, password and port to my own and uploaded the asp file, all I got was a page cannot be displayed.
The PC Radio Network: An upbeat variety of the 50s-Today! |
|
|
|
|
|
#13 |
|
Junior Member
|
Maybe the server does not have a XML renderer? A detailed errormessage would help me to solve this for you.
|
|
|
|
|
|
#14 |
|
Senior Member
|
Just go to http://www22.brinkster.com/pcradionetwork/Status.asp]The PC Radio Network[/url] and you can see for yourself. the file is uploaded to the server, but I don't have a link to it yet until I get it working.
The PC Radio Network: An upbeat variety of the 50s-Today! |
|
|
|
|
|
#15 |
|
Junior Member
|
That error comes from either you filling something in wrong or the DNAS is off. The script works, and is running at various places, here for example (with edited layout of course) http://www.sthlmlounge.com/?p=radio
|
|
|
|
|
|
#16 |
|
Senior Member
|
Ok. Perhaps you can see what's wrong if I post the code. here's what I have. Note: The password is not the ctual password. i changed it just for this posting:
<% ' ANOTHER SHOUTCAST STATUS PAGE ' By Philip 'daPhil' Johannessen, May 2003 ' www.daphil.com ' me@daphil.com 'FEEL FREE TO EDIT LAYOUT TO SUIT YOUR SITE, THATS THE IDEA ![]() 'USER DEFINED VARIABLES (CHANGE THESE) ServerDomain = "http://pcradionetwork.no-ip.com" 'DOMAIN ServerPass = "misfit" 'PASSWORD ServerPort = "8000" 'PORT 'MAKE SERVERURL ServerURL = "http://"& ServerDomain &":"& ServerPort &"/admin.cgi?pass="& ServerPass &"&mode=viewxml" 'INITIATE XMLDOM ENGINE Set objXMLDOM = Server.Createobject("Microsoft.XMLDOM") objXMLDOM.async = false objXMLDOM.setProperty "ServerHTTPRequest", true objXMLDOM.Load ServerURL 'CREATE COLLECTIONS AND STUFF ServerStatus = objXMLDOM.SelectSingleNode("//STREAMSTATUS").text StationName = objXMLDOM.SelectSingleNode("//SERVERTITLE").text BitRate = objXMLDOM.SelectSingleNode("//BITRATE").text ServerVersion = objXMLDOM.SelectSingleNode("//VERSION").text MediaType = objXMLDOM.SelectSingleNode("//CONTENT").text CurrentSong = objXMLDOM.SelectSingleNode("//SONGTITLE").text Users = objXMLDOM.SelectSingleNode("//CURRENTLISTENERS").text MaxUsers = objXMLDOM.SelectSingleNode("//MAXLISTENERS").text Set SongHistory = objXMLDOM.SelectNodes("//SONG") Set UserList = objXMLDOM.SelectNodes("//LISTENER") %> <html> <head> <title><%=StationName%></title> <style> body, td { font-family: Trebuchet MS, Tahoma, Verdana; font-size: 11px; color: #000000; } .bigheader { font-size: 40px; } .songtitle { font-size: 20px; } .tables { border-width: 1px; border-style: solid; border-color: #000000; background: #EEEEEE; } </style> </head> <body> <table align="center" width="700" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="center" colspan="2"> <font class="bigheader"><%=StationName%></font><br> <% If ServerStatus = 0 Then %> Server is currently down </td> <% Else %> Shoutcast v<%=ServerVersion%> streaming <%=MediaType%> at <%=BitRate%> kbps </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" align="center"> Current song <table width="100%" class="tables"> <tr> <td align="center"> <font class="songtitle"><%=CurrentSong%></font> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td width="50%" align="center" valign="top"> Song history <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%"> <% For Each Song In SongHistory %> <% If NOT Song.SelectSingleNode("TITLE").text = CurrentSong Then%> <tr> <td><%=Song.SelectSingleNode("TITLE").text%></td> </tr> <% End If %> <% Next %> </table> </td> <td width="50%" align="center" valign="top"> Connected users - <%=Users%> / <%=MaxUsers%> <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%" align="right"> <% For Each User In UserList %> <tr> <td><%=User.SelectSingleNode("HOSTNAME").text%> / <%=User.SelectSingleNode("USERAGENT").text%></td> </tr> <% Next %> </table> </td> <% End If %> </tr> </table> </body> </html> <% 'CLEAN UP Set objXMLDOM = NOTHING Set SongHistory = NOTHING Set UserList = NOTHING %> The PC Radio Network: An upbeat variety of the 50s-Today! |
|
|
|
|
|
#17 |
|
Junior Member
|
Enter the serveraddress without "http://"
|
|
|
|
|
|
#18 |
|
Senior Member
|
Thank you so much. You've been a great help. I got it working. Now, all i gotta do is change the background colors. Thanks alot!
The PC Radio Network: An upbeat variety of the 50s-Today! |
|
|
|
|
|
#19 |
|
Member
Join Date: Aug 2003
Posts: 69
|
i dont get this, i can go to your site with the asp file and it works fine, but when i go to http://www.noiseinfection.com/show/serverstatus.asp it asks me if i want to open or save a file.
|
|
|
|
|
|
#20 | |
|
Junior Member
|
Quote:
And this: ServerDomain = "http://66.235.23.45:8000/listen.pls" should be only the domain, like this: ServerDomain = "66.235.23.45" Maybe thats the problem, try changing it. |
|
|
|
|
|
|
#21 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
I have the exact same problem but my domain doesnt have "http://" or "listen.pls" any suggestions?
|
|
|
|
|
|
#22 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
okay, i found the problem, i needed a .asp enabled server. I now have one and things are running smoothly... all but 1 thing. When I am not broadcasting, it just appears as "Page Cannot Be Displayed"... is there any way to get a "<Station Name> Is Offline" message? Pls Help. Thanx
|
|
|
|
|
|
#23 |
|
Registered User
Join Date: Apr 2001
Location: Tenerife / Canary Islands
Posts: 103
|
status
Hi,
i tried to download the file, but cant find it anymore, anyone got a copy i can have? Either place it somewhere for me to down load or if its not too big, maybe email to me? omega1@arrakis.es thanks guys |
|
|
|
|
|
#24 |
|
Junior Member
|
|
|
|
|
|
|
#25 |
|
Registered User
Join Date: Apr 2001
Location: Tenerife / Canary Islands
Posts: 103
|
thanks!
|
|
|
|
|
|
#26 |
|
Junior Member
Join Date: Feb 2004
Posts: 4
|
FAO daPhil
thanks for the script daPhil, now i've got the page up and running. only thing now is, i'd like to display only the last 5 songs played rather than the really long list that it generates for me. is this changed server side or can i change it with the script?
|
|
|
|
|
|
#27 |
|
Junior Member
|
I dont understand... i have video/x-ms-asf asf asx loaded in my MIME settings and all i still keep getting is the code comeing up on the screen...
<% ' ANOTHER SHOUTCAST STATUS PAGE ' By Philip 'daPhil' Johannessen, May 2003 ' www.daphil.com ' me@daphil.com 'FEEL FREE TO EDIT LAYOUT TO SUIT YOUR SITE, THATS THE IDEA ![]() 'USER DEFINED VARIABLES (CHANGE THESE) ServerDomain = "68.194.193.215" 'DOMAIN ServerPass = "*****" 'PASSWORD ServerPort = "8000" 'PORT 'MAKE SERVERURL ServerURL = "http://"& ServerDomain &":"& ServerPort &"/admin.cgi?pass="& ServerPass &"&mode=viewxml" 'INITIATE XMLDOM ENGINE Set objXMLDOM = Server.Createobject("Microsoft.XMLDOM") objXMLDOM.async = false objXMLDOM.setProperty "ServerHTTPRequest", true objXMLDOM.Load ServerURL 'CREATE COLLECTIONS AND STUFF ServerStatus = objXMLDOM.SelectSingleNode("//STREAMSTATUS").text StationName = objXMLDOM.SelectSingleNode("//SERVERTITLE").text BitRate = objXMLDOM.SelectSingleNode("//BITRATE").text ServerVersion = objXMLDOM.SelectSingleNode("//VERSION").text MediaType = objXMLDOM.SelectSingleNode("//CONTENT").text CurrentSong = objXMLDOM.SelectSingleNode("//SONGTITLE").text Users = objXMLDOM.SelectSingleNode("//CURRENTLISTENERS").text MaxUsers = objXMLDOM.SelectSingleNode("//MAXLISTENERS").text Set SongHistory = objXMLDOM.SelectNodes("//SONG") Set UserList = objXMLDOM.SelectNodes("//LISTENER") %> <html> <head> <title><%=StationName%></title> <style> body, td { font-family: Trebuchet MS, Tahoma, Verdana; font-size: 11px; color: #000000; } .bigheader { font-size: 40px; } .songtitle { font-size: 20px; } .tables { border-width: 1px; border-style: solid; border-color: #000000; background: #EEEEEE; } </style> </head> <body> <table align="center" width="700" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="center" colspan="2"> <font class="bigheader"><%=StationName%></font><br> <% If ServerStatus = 0 Then %> Server is currently down </td> <% Else %> Shoutcast v<%=ServerVersion%> streaming <%=MediaType%> at <%=BitRate%> kbps </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" align="center"> Current song <table width="100%" class="tables"> <tr> <td align="center"> <font class="songtitle"><%=CurrentSong%></font> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td width="50%" align="center" valign="top"> Song history <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%"> <% For Each Song In SongHistory %> <% If NOT Song.SelectSingleNode("TITLE").text = CurrentSong Then%> <tr> <td><%=Song.SelectSingleNode("TITLE").text%></td> </tr> <% End If %> <% Next %> </table> </td> <td width="50%" align="center" valign="top"> Connected users - <%=Users%> / <%=MaxUsers%> <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%" align="right"> <% For Each User In UserList %> <tr> <td><%=User.SelectSingleNode("HOSTNAME").text%> / <%=User.SelectSingleNode("USERAGENT").text%></td> </tr> <% Next %> </table> </td> <% End If %> </tr> </table> </body> </html> <% 'CLEAN UP Set objXMLDOM = NOTHING Set SongHistory = NOTHING Set UserList = NOTHING %> |
|
|
|
|
|
#28 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
You could be getting this because you do not a an ASP supported host. A good, free, ASP host that I know of is www.1asphost.com just enter the text into "Notepad" and save it as <whatever>.asp, then upload it to your host. Hope this helps
|
|
|
|
|
|
#29 |
|
Junior Member
|
well isnt cant i just add in the mime handle?
|
|
|
|
|
|
#30 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
I'm not sure with all that mime stuff, what your looking for, it's much easier if you use PHP but if you still want to use ASP, i would just do what i said in the last post if you want the code to work.
|
|
|
|
|
|
#31 |
|
Junior Member
Join Date: Jan 2004
Posts: 5
|
Problems with the 'Server Status' script
I am also trying to get the ASP Server Status script to run, but I am not having any luck. I keep getting the error:
Microsoft VBScript runtime error '800a01a8' Object required: 'objXMLDOM.SelectSingleNode(...)' /listen/radio/serverstatus.asp, line 26 The code is below, i've replaced the password with *'s only below for security purposes: <% ' ANOTHER SHOUTCAST STATUS PAGE ' By Philip 'daPhil' Johannessen, May 2003 ' www.daphil.com ' me@daphil.com 'FEEL FREE TO EDIT LAYOUT TO SUIT YOUR SITE, THATS THE IDEA ![]() 'USER DEFINED VARIABLES (CHANGE THESE) ServerDomain = "216.180.242.115" 'DOMAIN ServerPass = "********" 'PASSWORD ServerPort = "8008" 'PORT 'MAKE SERVERURL ServerURL = "http://"& ServerDomain &":"& ServerPort &"/admin.cgi?pass="& ServerPass &"&mode=viewxml" 'INITIATE XMLDOM ENGINE Set objXMLDOM = Server.Createobject("Microsoft.XMLDOM") objXMLDOM.async = false objXMLDOM.setProperty "ServerHTTPRequest", true objXMLDOM.Load ServerURL 'CREATE COLLECTIONS AND STUFF ServerStatus = objXMLDOM.SelectSingleNode("//STREAMSTATUS").text StationName = objXMLDOM.SelectSingleNode("//SERVERTITLE").text BitRate = objXMLDOM.SelectSingleNode("//BITRATE").text ServerVersion = objXMLDOM.SelectSingleNode("//VERSION").text MediaType = objXMLDOM.SelectSingleNode("//CONTENT").text CurrentSong = objXMLDOM.SelectSingleNode("//SONGTITLE").text Users = objXMLDOM.SelectSingleNode("//CURRENTLISTENERS").text MaxUsers = objXMLDOM.SelectSingleNode("//MAXLISTENERS").text Set SongHistory = objXMLDOM.SelectNodes("//SONG") Set UserList = objXMLDOM.SelectNodes("//LISTENER") %> <html> <head> <title><%=StationName%></title> <style> body, td { font-family: Trebuchet MS, Tahoma, Verdana; font-size: 11px; color: #000000; } .bigheader { font-size: 40px; } .songtitle { font-size: 20px; } .tables { border-width: 1px; border-style: solid; border-color: #000000; background: #EEEEEE; } </style> </head> <body> <table align="center" width="700" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="center" colspan="2"> <font class="bigheader"><%=StationName%></font><br> <% If ServerStatus = 0 Then %> Server is currently down </td> <% Else %> Shoutcast v<%=ServerVersion%> streaming <%=MediaType%> at <%=BitRate%> kbps </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" align="center"> Current song <table width="100%" class="tables"> <tr> <td align="center"> <font class="songtitle"><%=CurrentSong%></font> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td width="50%" align="center" valign="top"> Song history <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%"> <% For Each Song In SongHistory %> <% If NOT Song.SelectSingleNode("TITLE").text = CurrentSong Then%> <tr> <td><%=Song.SelectSingleNode("TITLE").text%></td> </tr> <% End If %> <% Next %> </table> </td> <td width="50%" align="center" valign="top"> Connected users - <%=Users%> / <%=MaxUsers%> <table cellpadding="2" cellspacing="0" border="0" class="tables" width="98%" align="right"> <% For Each User In UserList %> <tr> <td><%=User.SelectSingleNode("HOSTNAME").text%> / <%=User.SelectSingleNode("USERAGENT").text%></td> </tr> <% Next %> </table> </td> <% End If %> </tr> </table> </body> </html> <% 'CLEAN UP Set objXMLDOM = NOTHING Set SongHistory = NOTHING Set UserList = NOTHING %> |
|
|
|
|
|
#32 |
|
Junior Member
Join Date: Jul 2004
Posts: 16
|
may i ask
what file extension do i save it as ???
|
|
|
|
|
|
#34 |
|
Junior Member
Join Date: Jul 2004
Posts: 16
|
thank you
|
|
|
|
|
|
#35 |
|
Junior Member
Join Date: Jul 2004
Posts: 16
|
thank you
|
|
|
|
|
|
#36 |
|
Junior Member
Join Date: Jul 2004
Posts: 16
|
thank you
|
|
|
|
|
|
#37 |
|
Junior Member
|
daphil,
Like the script! I was using the script from casterclub: http://www.casterclub.com/scast_asp2xml.php I like yours better. I used the "split" function and "replace" function to tweak it to my needs Check out my page http://www.pslradio.com I split the Artist and song to make seperate so I could make links to amazon, mxtabs and sheetmusicplus and do a search based on my current song. Check out my page http://www.pslradio.com Thumbs up on the script! |
|
|
|
|
|
#38 |
|
Junior Member
|
daphil,
Like the script! I was using the script from casterclub: http://www.casterclub.com/scast_asp2xml.php I like yours better. I used the "split" function and "replace" function to tweak it to my needs Check out my page http://www.pslradio.com I split the Artist and song to make seperate so I could make links to amazon, mxtabs and sheetmusicplus and do a search based on my current song. Check out my page http://www.pslradio.com Thumbs up on the script! |
|
|
|
|
|
#39 |
|
Junior Member
|
Hi All,
I have tweaked daphil's script to split current "artist" and "song". instead of it showing for example: "The Byrds - Turn Turn Turn" You can display like so: Artist: The Byrds Song: Turn Turn Turn Here is small update: 'CREATE COLLECTIONS AND STUFF ServerStatus = objXMLDOM.SelectSingleNode("//STREAMSTATUS").text StationName = objXMLDOM.SelectSingleNode("//SERVERTITLE").text BitRate = objXMLDOM.SelectSingleNode("//BITRATE").text ServerVersion = objXMLDOM.SelectSingleNode("//VERSION").text MediaType = objXMLDOM.SelectSingleNode("//CONTENT").text 'CHANGE THIS LINE 'CurrentSong = objXMLDOM.SelectSingleNode("//SONGTITLE").text 'TO THIS LINE strCurrentSong = objXMLDOM.SelectSingleNode("//SONGTITLE").text Users = objXMLDOM.SelectSingleNode("//CURRENTLISTENERS").text MaxUsers = objXMLDOM.SelectSingleNode("//MAXLISTENERS").text Set SongHistory = objXMLDOM.SelectNodes("//SONG") Set UserList = objXMLDOM.SelectNodes("//LISTENER") 'ADDED THESE LINES SplitCurrentSong = split(strCurrentSong, "-") strArtist = splitCurrentSong(0) strSong = splitCurrentSong(1) CurrentSong = "Artist: " & strArtist & "<br>Song: " & strSong 'END CHANGE - THATS IT See it in action: http://aspdevstudio.servemp3.com/movies/status.asp Again daphil, good script! CHEERS |
|
|
|
|
|
#40 | |
|
Major Dude
|
Quote:
Quick question, how easy would it be to adapt this script for multiple servers? We'd like to be able to display on one page what's playing on both our channels, one and two. Any assistance is much appreciated! |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|