Find IP address by PHP

Hello

I am finding IP address by PHP.  I just used a variable $ip address & use server variable $_SERVER[‘REMOTE_ADDR’] where story the user ip address. The code in below-

<?php

$ip=$_SERVER[‘REMOTE_ADDR’];
echo ‘<h1>Your IP address is: ‘.$ip.'</h1>’;

?>

Show Live Demo Plz click HERE.

Thanks-

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s