I was wondering how you could use sockets to send phone data across the network. For example if you wanted to code a pc to pc phone website where users could talk to one another through the website. I know how to use sockets to send data but how would you send and receive phone data so that it is directed to the computers speakers?
You would have to use some kind of a client side plug in, like Flash, and on the server side some kind of an audio source stream. I don't see how you can use PHP here other than for the normal page structure, you need something else to serve and listen for the audio. Perhaps some kind of a shoutcast server where both users have access to stream, might be a little tricky unless theres some software out there already to do it.
PHP can do that, but it's possibly a little over the top and you'd have to be uber to get it done. I'd know where to start, but be lost after an hour .... incase you are uber..... You can use winbinder to load dlls, and so can call system procedures, therefore getting control over the speakers, you can use ffmpeg or a similar command line interface to convert the audio stream on the fly by writing to stdin and having the output to stdout caught be php and streamed to the speakers, I know in theory it is possible, however like I said, uber, and over the top.
Thats not really doing it with PHP, and you are assuming that both people have PHP installed on their system for some reason. I think his asking for a website based solution. You can't do this without 3rd party tools that are meant for online audio streaming.
do you remember dialpad.com? How did that work. You could call from the website to a phone. I wanted to make something like that?
ah well guess ill have to scrap the idea. the only problem is routing the streaming audio data to the speakers. Don't know how to do that. oh well.