Getting the real remote IP address of the client can sometimes be quite tricky for PHP programmers. Receiving the correct remote IP address has a crucial role both for tracking activity and for the security purposes.
This tutorial is aimed at helping programmers to overcome such problems. Go ahead and see how to get the real remote IP address in PHP. Often, programmers try to use $_SERVER[‘REMOTE_ADDR’] for detecting the real IP address of the client:
<?php
echo "The user's IP address is : ". $_SERVER['REMOTE_ADDR'];
?>