in reply to Re^3: Getting client ip address from socket connect
in thread Getting client ip address from socket connect

Yes, that's because peeraddr() returns the raw in_addr struct. Either convert it to a string with

$remotehost=inet_ntoa($client->peeraddr);

or use

$remotehost=$client->peerhost;
like I suggested in my node.

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan