Dirk83 Posted April 24, 2013 Share Posted April 24, 2013 Hi, I am listening to a 3rd party websocket and now I want a PHP script to be triggered when new information comes through over the websocket without sending a whole new HTTP request (though it might want to trigger an HTTP request). How can I do this? Thanks, Dirk Quote Link to comment Share on other sites More sharing options...
lemmin Posted April 24, 2013 Share Posted April 24, 2013 You might have to give more information about your setup. Is the websocket open on the same server as your PHP script? Is the websocket open using PHP? Quote Link to comment Share on other sites More sharing options...
Dirk83 Posted April 24, 2013 Author Share Posted April 24, 2013 No, it is a 3rd party websocket, so the websocket is not running on the same server as the PHP script. I could install a websocket on my own server though in order to send messages from the 3rd webparty indirectly through my browser client to my own web server; in the case that that is necessary. Basically, when new information comes through from the 3rd party websocket I want my own server to perform calculations with the new data and possibly generate an HTTP request based on that. I am also open to suggestions to have all calculations performed on the web browser client and that the web browser client triggers an HTTP request through a javascript. Quote Link to comment Share on other sites More sharing options...
Dirk83 Posted April 24, 2013 Author Share Posted April 24, 2013 (edited) Does that clarify a bit? It is for a trading system, I listen to price data from an external web server (continuous through a websocket), then I want to perform calculations with them and if it triggers an event I want to cancel, update or place an order through an HTTP request. Edited April 24, 2013 by Dirk83 Quote Link to comment Share on other sites More sharing options...
Dirk83 Posted April 25, 2013 Author Share Posted April 25, 2013 Any suggestions? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.