PHP socket connection: C # code $ socketsocket_create (AF_INET, SOCK_STREAM, SOL_TCP); $ connectionsocket_connect ($ socket, $ IP, 2012 ); it is clear that the port 2012 on my local machine is already in the listening status. Why can't PHP on another machine be connected to my PHP socket connection?
The PHP code is as follows:
C # code
$ Socket = socket_create (AF_INET, SOCK_STREAM, SOL_TCP); $ connection = socket_connect ($ socket, $ IP, 2012 );
It is clear that Port 2012 on my local machine is already in the listening status. Why can't PHP on another machine be connected to Port 2012 on my local machine and be connected from PHP on the local machine? How to set it?
------ Solution --------------------
The network environment of the client is very complex, and your IP address cannot be accessed by the server, unless there is a forward in that vro.