Using sockets in PHP to build pc to pc phone website

Discussion in 'PHP' started by uniqueasitis, Jun 20, 2007.

  1. #1
    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?
     
    uniqueasitis, Jun 20, 2007 IP
  2. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    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.
     
    mrmonster, Jun 20, 2007 IP
  3. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #3
    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.
     
    krakjoe, Jun 21, 2007 IP
  4. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    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.
     
    mrmonster, Jun 21, 2007 IP
  5. uniqueasitis

    uniqueasitis Peon

    Messages:
    661
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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?
     
    uniqueasitis, Jun 21, 2007 IP
  6. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #6
    If it did actual phone calls then it would have to have been VoIP
     
    mrmonster, Jun 21, 2007 IP
  7. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #7
    I didn't think about it properly, my apologies.
     
    krakjoe, Jun 21, 2007 IP
  8. uniqueasitis

    uniqueasitis Peon

    Messages:
    661
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #8
    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.
     
    uniqueasitis, Jun 21, 2007 IP