// http://ip-api.com/php/180.180.124.174 /* { "as":"AS23969 TOT Public Company Limited", "city":"", "country":"Thailand", "countryCode":"TH", "isp":"TOT", "lat":15, "lon":100, "org":"TOT", "query":"180.180.124.174", "region":"", "regionName":"", "status":"success", "timezone":"Asia/Bangkok", "zip":"" } */ $pms_trackip = "pms_iptrack_".date("Y"); $sql = "CREATE TABLE IF NOT EXISTS `".$pms_trackip."` ( `id` int(11) NOT NULL AUTO_INCREMENT, `session_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `user_agents` TEXT COLLATE utf8_unicode_ci NOT NULL, `as_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `country` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `countryCode` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `isp` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `lat` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `lon` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `org` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `query` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `region` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `regionName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `timezone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `zip` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `entered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) )"; $stmt = $db->prepare($sql); $stmt->execute()or die("
$sql".print_r($stmt->errorInfo())); $content_data_api = file_get_contents("http://ip-api.com/json/".$_SERVER['REMOTE_ADDR']); $json = json_decode($content_data_api,true); extract($json); $sql = "INSERT INTO ".$pms_trackip." \n"; $sql .= "SET \n"; $sql .= "session_id = '$session_id', \n"; $sql .= "user_agents = \"".addslashes($_SERVER['HTTP_USER_AGENT'])."\", \n"; $sql .= "as_name = \"".addslashes($as)."\", \n"; $sql .= "city = \"".addslashes($city)."\", \n"; $sql .= "country = \"".addslashes($country)."\", \n"; $sql .= "countryCode = \"".addslashes($countryCode)."\", \n"; $sql .= "isp = \"".addslashes($isp)."\", \n"; $sql .= "lat = \"$lat\", \n"; $sql .= "lon = \"$lon\", \n"; $sql .= "org = \"".addslashes($org)."\", \n"; $sql .= "query = \"".$_SERVER['REMOTE_ADDR']."\", \n"; $sql .= "region = \"".addslashes($regionName)."\", \n"; $sql .= "status = \"$status\", \n"; $sql .= "timezone = \"$timezone\", \n"; $sql .= "zip = \"".addslashes($zip)."\", \n"; $sql .= "entered = NOW() \n"; $stmt = $db->prepare($sql); $stmt->execute()or die("
$sql".print_r($stmt->errorInfo())); ?>
Dezembro 2024 | ||||||
Do | Se | Te | Qa | Qi | Se | Sa |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Janeiro 2025 | ||||||
Do | Se | Te | Qa | Qi | Se | Sa |
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Fevereiro 2025 | ||||||
Do | Se | Te | Qa | Qi | Se | Sa |
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Março 2025 | ||||||
Do | Se | Te | Qa | Qi | Se | Sa |
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |