Old 26th September 2008, 09:39   #1
THEARTOFWEB
Junior Member
 
Join Date: Sep 2008
Location: Rome, Italy
Posts: 15
http access header

Hi everybody,

I'm on my way to create a Perl script to query shoutcast server to check if it is up or down. I would like to know how to actually query shoutcast server. I am thinking of doing it by using http GET request. The thing is I do not have a shoutcast server handy right now and would love you to tell me how the http get request is supposed to be made of. How shoutcast is going to reply to that query? By the way...is it always running under 127.0.0.1:8000 ??

thanks
THEARTOFWEB is offline   Reply With Quote
Old 26th September 2008, 12:26   #2
THEARTOFWEB
Junior Member
 
Join Date: Sep 2008
Location: Rome, Italy
Posts: 15
I'm sorry I could have done with search the web first. That's what I came to know:

code:

-> GET / HTTP/1.1

HTTP/1.0 404 Stream not found
Server: icecast/1.3.13
Connection: close
Content-Type: text/html

...html...

-> GET / HTTP/1.1

ICY 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/posix v1.6.0rc2<BR>
icy-name:MondoTuccio's Broadcast ***LIVE*** Prove: 19/09/08
icy-genre:Hip-Hop
icy-url:http://www.thxxxxxxxx.xxxx
icy-pub:0
icy-br:80

...stream...

-> GET /listen.pls HTTP/1.1

HTTP/1.0 200 OK
content-type:audio/x-scpls
Connection: close

[playlist]
NumberOfEntries=1
File1=http://:8000/



I am still tripped up though.

- Do I have to query for GET / or GET /listen.pls?
- As you can see the header above was taken from Icecast server...does that go for Shoutcast too?
- How can I get to know what streaming software version is running?
- does Shoutcast broadcast over HTTP?

thanks
THEARTOFWEB is offline   Reply With Quote
Old 26th September 2008, 14:13   #3
THEARTOFWEB
Junior Member
 
Join Date: Sep 2008
Location: Rome, Italy
Posts: 15
by the way, is there any differences between:
code:

ICY 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/posix v1.6.0rc2<BR>
icy-name:MondoTuccio's Broadcast ***LIVE*** Prove: 19/09/08
icy-genre:Hip-Hop
icy-url:http://www.theartofweb.net
icy-pub:0
icy-br:80


and:
code:

HTTP/1.1 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/posix v1.6.0rc2<BR>
icy-name:MondoTuccio's Broadcast ***LIVE*** Prove: 19/09/08
icy-genre:Hip-Hop
icy-url:http://www.theartofweb.net
Content-Type: audio/mpeg
icy-pub:0
icy-br:80



That is because I would like to get my web server pretend to be a shoutcast server so I can listen to my streams thru it. Hence, I need to send some sort of header...should I go ICY or HTTP?

thanks
THEARTOFWEB is offline   Reply With Quote
Old 26th September 2008, 14:15   #4
dotme
Moderator
 
dotme's Avatar
 
Join Date: Feb 2005
Location: USA
Posts: 4,024
Try going after "7.html" on the shoutcast server. That returns basic information including bitrate, status, etc.
dotme is offline   Reply With Quote
Old 28th September 2008, 01:34   #5
Tom
Moderator
 
Join Date: Apr 2000
Posts: 4,491
If you are looking for a script to relay a stream let me know because I'm pretty sure I have one somewhere (it's in php though).

Tom

Tom is offline   Reply With Quote
Old 28th September 2008, 12:43   #6
THEARTOFWEB
Junior Member
 
Join Date: Sep 2008
Location: Rome, Italy
Posts: 15
well, what do you mean by "relay" ?? I think I have done something similar but it's perl
THEARTOFWEB is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump