read mp3 stream and echo back to client in php

前端 未结 1 1822
星月不相逢
星月不相逢 2021-01-24 04:43

What I intend to achieve, is a page that when a client is to connect, the page is to constantly read from a local ice-cast server (http://127.0.0.1:8000/stream.mp3)

1条回答
  •  梦谈多话
    2021-01-24 05:16

    file_get_contents attempts to read a stream up to the end, and since you're trying to read from a broadcast server there will be no end.

    If HTML5 is an option, the following may work.

    
    

    Alternative solution:

    0 讨论(0)
提交回复
热议问题