Reputation: 419
I'm wanting to push real time data to my website via web sockets. The data is basically just text saying "Artist - Title", it is generated via my Windows server that is streaming live constantly.
Can anybody point me in the right direction (i.e a manual/knowledge site) where I can read up on what will be required? Right now I have a PHP script that is pulling data from the MySQL database on my server, that then drops it onto my site as described above (Artist - Title) - obviously this doesn't accomplish what I want as it requires people to refresh the site every time they want to see what's currently being streamed, what I want is for it to just appear the second it starts playing on my server.
I've tried researching into web sockets with no prevail to what I want to accomplish. If anybody has the knowledge as to what I'm missing to make this work I would be most appreciative of your answer.
Upvotes: 3
Views: 948
Reputation: 139
Consider running a Node.js server with socket.io. See socket.io chat app tutorial and it should become clear.
Basically you need JavaScript on your page to open the socket and respond to messages.
Upvotes: 5