I am writing a web application with PHP and Javascript that uses Ratchet WebSockets for communication data between server and clients, but I need to get client's IP address.
In Ratchet WebSockets have a function "onOpen" that it give an object of "ConnectionInterface":
public function onOpen(ConnectionInterface $conn){ $this->clients->attach($conn); echo "new Connection is connected...({$conn->resourceId})\n"; } It only has a resource id. How can I get the IP address of this connection?