8109175771

Get the client IP address using PHP

PHP 25-02-2021

Get the client IP address using PHP

Details

A unique string of characters that identifies each computer using the Internet Protocol to communicate over a network is called IP Address.

to get IP Address of visitors you can use below code

$_SERVER['REMOTE_HOST'];

After using this code return the IP address but sometime this code doesn't return the current IP address of visitors.so that time we can use other server variables


Example

Close Ads