When a visitor visit web page, he can his specification like IP Address, Country Name, Country Flag, City etc.
The following code is available for PHP developers.

<?php

// IP Address
$user_ip = getenv('REMOTE_ADDR');
echo $user_ip; 

// Note: use 'echo' to display the IP Address of user or you can insert into database for record. Similarly for others one...

// Country Name
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$country = $geo["geoplugin_countryName"];


// City Name
$city = $geo["geoplugin_city"];

// Time (with proper time zone)
date_default_timezone_set("Asia/Karachi"); 
$time = date('Y-m-d'); // Date as per the region of Karachi, Pakistan Time Zone.
$time2= date('h:i:s A'); // Time as per the region of Karachi, Pakistan Time Zone.