|
|
#1 |
|
Junior Member
Join Date: Feb 2004
Posts: 2
|
HOW-TO: Get SC playlist file
I badly needed a way to dynamicly link to the SC stream of the radio station I work for. We broadcast a stream from a 3rd party computer, and it doesn't have a static address. So, I came up with a quick and dirty piece of PHP code to get the playlist file from shoutcast.com. It uses the search query to return the file.
NOTE: You *MUST* have fopen wrappers enabled to use this funtcion. If you have PHP3 or PHP4 < 4.3.0, you'll need a walk around for the file_get_contents() function. You can find that here. Here is the function part of it: PHP Code:
code: Hope this helps someone! If anyone knows of a simpler and/or faster way to do this, pleas contact me at: sean@boyercentral.net Cheers! |
|
|
|
|
|
#2 |
|
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
i wouldn't recommend using this script, SHOUTcast.com keeps track of usages from the location of your script and will eventually block it if you get loads of traffic to it.
-Jay | Radio Toolbox.com |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2004
Posts: 2
|
Well, maybe 5-10 hits a day for now. I wouldn't consider that loads... Anyway, is there any easier way? I mean, I NEED to do this somehow! Help would be much appreciated!
Thanks for the heads up btw
|
|
|
|
|
|
#4 |
|
Moderator Alumni
Join Date: May 2000
Location: Next Door
Posts: 8,942
|
how about keeping track of your ip yourself or using a no-ip or other such dynamic ip to hostname services. Relying on the SHOUTcast yp is actually against the terms of service any way and takes away valuable resources from their system. For the completely lazy just link to a search of your station on the yp. At least then shoutcast.com will get ad revenue from the hit.
-Jay | Radio Toolbox.com |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|