I have a big idea, but I'm not quite sure if it's possible. I want to write an application in php for sharing music. Now, this is not just any music sharing software, it's very special. I want to implement the ability for two people to stream mp3 sound to each-other. For instance, I'm talking to my buddy on ICQ and I say, hey you've gotta here this song. From there we both go to the website that is hosting the application. I than upload the mp3 song to the server and my buddy can stream the music to his computer.
Sure this is nothing special yet, but this is where my difficulty begins. I don't want to use any external software. I would use Flash to play the mp3's, and the server would take care of listing all available songs. My issue is getting the music from my computer to my buddies in a small period of time. Flash 6 will stream an mp3 url, so my problem is streaming the upload so that the Flash client can begin to stream the music before the file is finished uploading to the server. I don't know of anyway to bypass the server and stream directly from client to client without external software, but I figure there is a way to stream an upload with php so that the file is saved on the server periodically during the upload. Any ideas?
Thanks
Big idea for streaming mp3's
Moderator: General Moderators
you could perhaps create a socket server and run as a daemon, if your site is in a shared hosting env I dont think your ISP would allow such...
AFAIK php's http POST and file upload feature is not workable as you wont know the filename of the temporary file until it is done uploading, so if you do need/want it by http POST you'll have to handle the stream manually, and it's likely much easier to create with perl or python (or whatever other language you may know) and retrieve via cgi and pass through directly on to a file in an identifiable manner..
AFAIK php's http POST and file upload feature is not workable as you wont know the filename of the temporary file until it is done uploading, so if you do need/want it by http POST you'll have to handle the stream manually, and it's likely much easier to create with perl or python (or whatever other language you may know) and retrieve via cgi and pass through directly on to a file in an identifiable manner..
socket server
Can flash connect directly to a port and send data? I suppose this topic is becoming more and more less php oriented.
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
check my post:
viewtopic.php?t=13275&highlight=winamp
viewtopic.php?t=13275&highlight=winamp