I have been stuck on this for a while.
I have an http::daemon server running. I accept connections from the client to do various things, mostly pull down files.
One thing I do on the client side is use the mirror function to check if a file is up to date or not with the file on the server and...
Ahh I found it after looking around all over. For anyone curious...
$other_end = getpeername($c);
($port, $iaddr) = unpack_sockaddr_in($other_end);
$ip_address = inet_ntoa($iaddr);
$c is from accept() when you get the connection.
~Blake
I have a server that uses http::daemon to accept requests. I need a way to get the IP of the users connecting to the http::daemon but I can't seem to find out how to do this. Another way might be to some how get the IP of the user connected to the port that the http:daemon is on but I haven't...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.