Last updated on November 11th, 2022 at 12:06 pm

This is a very simple script to get the IP address of your visitor using php. Again keep in mind that you will not get the original IP address of your visitor (end user) if they are using proxy.

<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "Your IP Address Is ".$ip;
?>

Once you get your visitor IP address you can go to this tutorial and integrate Google API to show the Map.

Demo

Leave a Reply

Your email address will not be published. Required fields are marked *