Getting IP Address of User in PHP

  1. <!doctype html>  
  2. <html>  
  3.   
  4.     <head>  
  5.         <title>IP Address</title>  
  6.     </head>  
  7.   
  8.     <body>  
  9.         <?php    
  10.     
  11.  $ip_address = $_SERVER["REMOTE_ADDR"];    
  12.     
  13.  echo "Visitor's IP address is ".$ip_address;     
  14.     
  15. ?> </body>  
  16.   
  17. </html>