Get user IP address in PHP

Description

The following code shows how to get user IP address.

Example


<?php//w w  w.  ja v a  2s.c  o m

$address = $_SERVER['REMOTE_ADDR'];
echo $address;


?>




















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions