You can use the $_SERVER superglobal in PHP to get the user's IP address.

  • TRUE
  • FALSE
The statement is true. In PHP, you can use $_SERVER['REMOTE_ADDR'] to retrieve the IP address of the user who accessed the current script. This information can be used for various purposes, such as security logging, user tracking, or geolocation. By accessing the 'REMOTE_ADDR' key within the $_SERVER superglobal, you can obtain the client's IP address. Learn more: https://www.php.net/manual/en/reserved.variables.server.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *