How to Get User IP Address using php script
We can get the IP address of any visitor by using PHP.It is very easy to get user IP address using php script.We can store IP address of our visitors for security reason.Similarly, based on the IP address we can also redirect the browser to different areas of the site.
Here's the code:
<?php
$ip=$_SERVER['REMOTE_ADDR'];
echo "Your ip is : $ip";
?>
That's all.Share your scripts with us in the comments!
Sharing is sexyHere's the code:
<?php
$ip=$_SERVER['REMOTE_ADDR'];
echo "Your ip is : $ip";
?>
That's all.Share your scripts with us in the comments!
0 comments for this post
Leave a reply