Getting the IP Address of the Client in PHP


Retrieve the client’s IP address from the $_SERVER superglobal.

Source Code

$ipAddress = $_SERVER['REMOTE_ADDR'];
echo $ipAddress;
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments