Question about possible lag on internet radio station

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
AngusL
Forum Contributor
Posts: 155
Joined: Fri Aug 20, 2004 4:28 am
Location: Falkirk, Scotland

Question about possible lag on internet radio station

Post by AngusL »

I've currently got a shoutcast internet radio system set up and running on my computer.

I've got a little page on my site that'll let you stream the music in the web page, along with a little information about the server.

I'd like to lock down the NAT rules so that only this page can be used to connect to the server (just for the sake of keeping things reasonably locked down). At the moment this of course doesn't work - because it's streamed to each client separately. What I intend to do is put this page into a password protected directory so that I can access it but others can't - and write a little system to control the playlist etc. I was curious if there was any chance that using PHP to connect to the shoutcast server, then provide a URL on that server from which to stream, would work without too much lag.

A - Final client
B - Server with URL on it
C - Server running Shoutcast server

A little simpler explanation would be that A interacts with the system I've written on B, which then acts as a proxy between A and C which is playing the music so that only B connects to A. C would tell B what to ask of A. Not a very technical explanation but it maybe gets my point across.

Is this feasible?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

So you're using a script on your server as a shoutcast proxy.. it depends on what kind of pipe that servers running on (10mbit / 100mbit). There would have to be equal or more lag using a proxy, since the stream is traveling more hops across the internet to the end user. If shoutcast is in NY for example (no idea where it really is) and your server is in Dallas, and a user logs on from NY their traffic is going to be routed through your server and then to shoutcast. You're also going to rack up a huge bandwidth bill at your host.
Post Reply