Event Listener in PHP -


I want my web server to notify me via a php page, when on another TCP server There is an event for which the PHP page has successfully connected to via a socket. This event wants to send messages to the web server like a TCP server, etc. Is there any way to complete this and / or any reference to how to do it?

Make sure:

  $ fp = fsockopen ("tcp: //example.com ", 8888) or die (" not connected "); While (! FIF ($ FP)) {$ pc = fread ($ handle, 8192); If ($ PC === False) Stellen ($ PC) == 0) break; // A new packet has arrived / you should read in a variable and wait for another packet // Until you know that the message has been completed / (depends on the protocol) collect_in_result ($ pc) ; If (message_is_complete ()) {if (check_event ()) {// take action}}}  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -