|
|
|
@ -107,8 +107,8 @@ class UserService
|
|
|
|
|
|
|
|
|
|
$testResource = M('test_resource','tab_')->where('user_id=%s and apply_status=2', $user['id'])->find(); //测试资源(扶持号)
|
|
|
|
|
if ($testResource) {
|
|
|
|
|
if ($this->isIpWarning($user, $deviceNum)) {
|
|
|
|
|
$this->ipWarningLog($user, $testResource, $deviceNum);
|
|
|
|
|
if ($this->isIpWarning($user, $clientIp)) {
|
|
|
|
|
$this->ipWarningLog($user, $testResource, $clientIp);
|
|
|
|
|
}
|
|
|
|
|
if ($this->isDeviceError($user, $testResource, $deviceNum)) {
|
|
|
|
|
$userData['last_device_number'] = $deviceNum;
|
|
|
|
@ -183,7 +183,7 @@ class UserService
|
|
|
|
|
M('protect_log','tab_')->add($data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function isIpWarning($user, $deviceNum)
|
|
|
|
|
protected function isIpWarning($user, $clientIp)
|
|
|
|
|
{
|
|
|
|
|
$newResult = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip='.$clientIp);
|
|
|
|
|
$oldResult = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip='.$user['login_ip']);
|
|
|
|
|