Hi, I'm trying to get the remote address IP from current connection, because I need to make a ACL service using the IP.
This is part of my code:
$wss = new SocketIO(8084);
$wss->on("connection", function ($socket) use ($wss) {
$socket->on("ready", function ($msg) use ($socket) {
print "Ready received: {$socket->id}@{$socket->getRemoteIP()}\n";
$socket->emit("ack", $msg);
});
});
Hi, I'm trying to get the remote address IP from current connection, because I need to make a ACL service using the IP.
This is part of my code:
But is not working, any advice? Thanks anyway