I'm running a nodejs / socket.io (v 0.7) server to push data to web clients. That works greatly.
To extend the application, I need to trigger / influence socket.io over php. I know a solution that works with cURL over http with the nodejs http server.
One possible solution is to run the socket.io server and the nodejs http server in one an the same app.js. The clients connect and communicate with socket.io, and the only allowed connection to the "seperate" http server (listening on another port than socket.io, of course) is from 127.0.0.1 respectively from the php server over cURL.
Because the both servers are in the same scope, the http server can trigger events on the socket.io server.
My Question: doest that make any sense? Is there a cleaner solution to trigger events on socket.io from PHP?