Leave socket listening for connections in PHP

0
  

How to create a socket and leave it in listening mode to receive a connection on an X port of any network IP, either external or internal?

I want to create a script that waits for connections on a given port, and that comes from any netcat-style IP when you run with "-l -p 8080" , for example. So that another file connects to an address on that port (8080 in the case of the example), but that part is not the focus, but create a listener.

I've tried something like socket_create_listen() but it was not successful.

    
asked by anonymous 31.10.2018 / 19:36

0 answers