PHP Get User IP

Favourite

A PHP script to display the user's IP Address. Just palce this code wherever you want the IP Address to display.

Code Snippet

<?php

$ip = $_SERVER["REMOTE_ADDR"];

?>

Sample Usage

<?php

$ip = $_SERVER["REMOTE_ADDR"];

echo 'Your IP Adress is:'. $ip;

?>
Categories : Web Development, Programming, PHP
Tags : IP Address


author's photo

Author : Blue Cloud

Just a normal software developer who love to write code. Developing professional software since 1999. After working in the software industry for many years, I've started my own website to share knowledges and experiences.

COMMENTS
blog comments powered by Disqus