XML and SHOUTcast [Technical]

This forum will contain various articles contributed by the team and other invited guest.
Post Reply
User avatar
Jay
Will work for food (Administrator)
Posts: 2868
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

XML and SHOUTcast [Technical]

Post by Jay » Wed Feb 20, 2002 2:30 pm

Intro
I have spent alot of time thinking about XML and the different things you can do with it to utilize some killer websites. First, what the heck is it?

Well XML is basically a markup language like HTML, it stands for Extensible Markup Language. It was designed to put structured data in a text file. It isn't meant to be read like HTML, XML is more specifically designed for web applications and storage.

Why Does SHOUTcast use XML? And where did the web templates go?
Whoa there cowboy one question at a time :). This is only a speculation but from what I gather SHOUTcast decided to do this to allow you to have more freedom with your Server's content. This allows you to list how many listeners, how long they have been connected, what they are using to connect and an abundance of other information about your server, on to a webpage or into an application.

The Web Template idea was broke in SHOUTcast 1.5 and the developers decided that it would be better if SHOUTcast just gave your server the data rather then host it for your websurfers. So they just left it out, but it can still generate a template to your local harddrive.

This may seem like a problem but it is actually better for your server and it gives you alot more freedom.

What are some ways XML can be used?
Well boy I will tell you, I have come up with some crazy concepts to utilize this feature of SHOUTcast, but they have not been implemented yet. So I will leave it to your imagination.

But alot of people use the XML to display current song information and the amount of listeners there are on a server. Heh, kind of boring if you ask me, you could conceivably put together a php script, asp script, perl, or an actual application that tells you stats like running totals on listeners and graphs that tell you how often a listener has connected, I have recently written such an app but it is waiting for the a release of SHOUTcast which is higher then 1.8.7 before it can be finished.

What Programming Languages support XML?
Well it's not really a question of support, XML is an open standard so you can download functions and classes for just about any programming language.

In web development, alot of people use PHP or ASP, for some example code in PHP check out Tom Pepper's Source.
Your webserver will have to have php support for this particular peice of code. I myself am a heavy php user, just check out the extension of this doc in your browser's address line. So you can expect just about anything I put out on this subject to lean heavily toward php, sorry ASP users but if anyone has done something in ASP please post a url to it in the comments section.

What concepts can you come up with?
So what concepts for web design can you come up with? Is the Current song and Listener Count enough or can there be more. I agree that Current song is cool but there is alot of power behind this feature. Imagine what you could do if you had a Database on you webserver, Album info about the current song can be displayed. Song voting, really you want to build a community around your radio station because that is what radio is all about.

Feel free to leave a comment if you feel that I have missed something. Do not reply with questions. Questions should go in the Audio Streaming forum. Questions will be split from this thread and moved to appropriate forums.

Post Reply