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
Loading...
Related Quiz
- What is Form Handling in PHP?
- What are some common practices in PHP when using abstract classes in OOP?
- In a PHP do...while loop, the condition is tested ______ the code block is executed.
- The switch statement in PHP can only test a single condition.
- What are some differences between using PHP with MySQL versus other database systems?