Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
ticker_config
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallets
ticker_config
Commits
a27f96e8
Commit
a27f96e8
authored
Dec 06, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
16ed964c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
index.php
api/index.php
+5
-7
No files found.
api/index.php
View file @
a27f96e8
...
...
@@ -13,21 +13,19 @@ define('WALLET_RUNTIME_PATH', dirname(__DIR__)); //定义程序运行的目录
if
(
isset
(
$_GET
[
'env'
])
&&
'test'
==
$_GET
[
'env'
])
{
require_once
__DIR__
.
'/../common/helper/InitAppHelper.php'
;
#if (defined('REQ_ORIGIN')){
$realip
=
InitAppHelper
::
getUserIp
();
echo
$realip
;
exit
;
$ip_list
=
file_get_contents
(
'/data_wallet/api_ip_limit.txt'
);
$ip_list
=
file_get_contents
(
'http://47.100.212.109/api_ip_limit.txt'
);
$ip_arr
=
explode
(
"
\n
"
,
$ip_list
);
foreach
(
$ip_arr
as
$key
=>
$ip
){
if
(
$ip
==
$realip
){
foreach
(
$ip_arr
as
$key
=>
$ip
)
{
if
(
$ip
==
$realip
)
{
$data
=
[
'code'
=>
403
,
'message'
=>
'请求次数过多!'
];
echo
json_encode
(
$data
);
exit
;
echo
json_encode
(
$data
);
exit
;
}
}
#}
}
require
WALLET_PROJECT_PATH
.
'/vendor/autoload.php'
;
...
...
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