Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
php_utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
php_utils
Commits
6838c0a4
Commit
6838c0a4
authored
Aug 19, 2021
by
崔伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0819_wangdong_shq_ipignore' into 'master'
add:ignore shq ip‘ See merge request bp/php_utils!1
parents
4fb2b99e
b8164a87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
1 deletion
+73
-1
IP.php
src/Common/IP.php
+73
-1
No files found.
src/Common/IP.php
View file @
6838c0a4
...
@@ -393,7 +393,7 @@ class IP
...
@@ -393,7 +393,7 @@ class IP
foreach
(
$ip
as
$one
)
foreach
(
$ip
as
$one
)
{
{
if
(
!
self
::
is_intranet
(
$one
)
&&
$one
!==
''
)
if
(
$one
!==
''
&&
!
self
::
is_intranet
(
$one
)
&&
!
self
::
is_shq
(
$one
)
)
{
{
$internet_ips
[]
=
$one
;
$internet_ips
[]
=
$one
;
}
}
...
@@ -417,4 +417,76 @@ class IP
...
@@ -417,4 +417,76 @@ class IP
(
$long
>=
2886729728
&&
$long
<=
2887778303
)
||
//172.15.0.0 ~ 172.31.255.255
(
$long
>=
2886729728
&&
$long
<=
2887778303
)
||
//172.15.0.0 ~ 172.31.255.255
(
$long
>=
3232235520
&&
$long
<=
3232301055
);
//192.168.0.0 ~ 192.168.255.255
(
$long
>=
3232235520
&&
$long
<=
3232301055
);
//192.168.0.0 ~ 192.168.255.255
}
}
/**
* 判断是否简网生活圈优客云ip
*
* @param $ip
* @return bool
*/
public
static
function
is_shq
(
$ip
)
{
$ipIgnoreArray
=
[
'123.59.135.125'
,
'106.75.78.45'
,
'106.75.106.72'
,
'106.75.24.149'
,
'106.75.90.178'
,
'106.75.25.238'
,
'106.75.7.123'
,
'117.50.10.4'
,
'117.50.13.14'
,
'106.75.70.11'
,
'106.75.120.33'
,
'106.75.103.119'
,
'106.75.126.234'
,
'106.75.8.17'
,
'106.75.66.217'
,
'106.75.26.98'
,
'117.50.101.102'
,
'106.75.28.8'
,
'123.59.137.102'
,
'106.75.72.206'
,
'106.75.27.141'
,
'106.75.49.133'
,
'117.50.107.175'
,
'106.75.95.163'
,
'106.75.21.36'
,
'106.75.99.29'
,
'106.75.7.229'
,
'106.75.27.151'
,
'106.75.115.25'
,
'117.50.105.119'
,
'106.75.110.215'
,
'106.75.26.223'
,
'106.75.122.185'
,
'117.50.59.107'
,
'117.50.4.46'
,
'117.50.82.165'
,
'106.75.109.124'
,
'117.50.95.34'
,
'123.59.53.82'
,
'117.50.90.239'
,
'106.75.25.179'
,
'106.75.126.16'
,
'106.75.50.87'
,
'106.75.30.181'
,
'106.75.126.121'
,
'106.75.61.99'
,
'106.75.93.183'
,
'117.50.90.105'
,
'106.75.6.131'
,
'106.75.24.77'
,
'106.75.78.10'
,
'106.75.18.203'
,
'117.50.100.125'
,
'106.75.32.125'
,
'117.50.95.3'
,
'117.50.13.104'
,
'117.50.39.114'
,
'117.50.1.29'
,
'117.50.39.93'
,
'117.50.0.170'
];
return
in_array
(
$ip
,
$ipIgnoreArray
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment