When visitors visit your website, this type of information can be stored in the database. It can also retrieve details of visitors from its IP address and other request headers to the current page. Currently, it records user computer operating systems, browsers, IP addresses, countries, cities, geographic coordinates, Internet service providers or use ip-api.comWeb services. Institute
When visitors visit your website, this type of information can be stored in the database. It can also retrieve details of visitors from its IP address and other request headers to the current page. Currently, it records user computer operating systems, browsers, IP addresses, countries, cities, geographic coordinates, Internet service providers or use ip-api.comWeb services. Institute
When visitors visit your website, this type of information can be stored in the database.
It can also retrieve details of visitors from its IP address and other request headers to the current page.
Currently, it records user computer operating systems, browsers, IP addresses, countries, cities, geographic coordinates, Internet service providers or Web services using ip-api.com.
The stored data can be associated with a given domain name address.
Http://www.codepearl.com/files/239.html PHP
setSubdomain("www.codepearl.com");$info->getVisitorInfo($_SERVER['HTTP_USER_AGENT']);$info->insertInfo();?>
CREATE TABLE IF NOT EXISTS `visitors` (`id` int(11) NOT NULL, `domain` varchar(150) NOT NULL, `ip` varchar(15) NOT NULL, `serverDate` varchar(10) NOT NULL, `serverTime` varchar(10) NOT NULL, `timeZone` varchar(100) NOT NULL, `userOS` varchar(100) NOT NULL, `userBrowser` varchar(100) NOT NULL, `userAgent` varchar(300) NOT NULL, `country` varchar(100) NOT NULL, `countryCode` varchar(10) NOT NULL, `city` varchar(100) NOT NULL, `state` varchar(10) NOT NULL, `lat` varchar(40) NOT NULL, `lon` varchar(40) NOT NULL, `isp` varchar(200) NOT NULL, `org` varchar(200) NOT NULL, `asp` varchar(200) NOT NULL) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
Function getVisitorInfo ($ httpUserAgent) {$ this-> setUserIp (); $ this-> setServerDate (); $ this-> setServerTime (); $ this-> setUserOs ($ httpUserAgent); $ this-> setUserBrowser ($ httpUserAgent); $ this-> setUserAgent ($ httpUserAgent ); $ query = @ unserialize (file_get_contents ('HTTP: // ip-api.com/php/'.w.this-> getUserIp ())); // you can set $ this-> setUserCountry ($ query ['country']) for the IP Retrieval Interface; $ this-> setUserCountryCode ($ query ['countrycode']); $ this-> setUserCity ($ query ['city']); $ this-> setUserStateOfRegion ($ query ['regionname']); $ this-> setLatitude ($ query ['lat']); $ this-> setlongpolling ($ query ['lon ']); $ this-> setISP ($ query ['isp ']); $ this-> setORG ($ query ['org']); $ this-> setAS ($ query ['as']); $ this-> setTimeZone ($ query ['timezone ']);}