Skip to content
This repository was archived by the owner on Mar 2, 2024. It is now read-only.

Commit da0ec11

Browse files
authored
Update post.php
1 parent ae82fcb commit da0ec11

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Data/post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@
168168
if (trim($req["username"]) == $result["username"] && trim($req["password"]) == $result["password"]) {
169169
$_SESSION['login'] = 'admin';
170170
$ip = $_SERVER["REMOTE_ADDR"];
171-
$address = curl('https://api.oioweb.cn/api/ipaddress.php?host=' . $ip, 'GET', 0, 0);
171+
$address = curl('https://api.muxiaoguo.cn/api/ip?type=b&ip=' . $ip, 'GET', 0, 0);
172172
$address = json_decode($address, true);
173-
$address = $address['disp'];
173+
$address = $address['data']['Geographical_location'];
174174
$time = time();
175175
if ($address && $ip) {
176176
$addLog = $db->query("INSERT INTO `mxgapi_login_log` (`id`, `ip`, `address`, `time`) VALUES (NULL, '{$ip}', '{$address}', '{$time}');");

0 commit comments

Comments
 (0)