mirror of https://github.com/IoTcat/img-api.git
parent
afb1432791
commit
61bed92755
3 changed files with 45 additions and 2 deletions
@ -0,0 +1,18 @@ |
||||
<?php |
||||
|
||||
|
||||
$redis = new redis(); |
||||
$redis->connect('redis',6379); |
||||
|
||||
$keys = $redis->keys('api/img/_ip/*'); |
||||
|
||||
|
||||
$res = array(); |
||||
foreach($keys as $key){ |
||||
$res[$key] = $redis->get($key); |
||||
} |
||||
|
||||
arsort($res); |
||||
|
||||
foreach($res as $a => $b) |
||||
echo "$a => $b <br>"; |
@ -0,0 +1,18 @@ |
||||
<?php |
||||
|
||||
|
||||
$redis = new redis(); |
||||
$redis->connect('redis',6379); |
||||
|
||||
$keys = $redis->keys('api/img/_num/*'); |
||||
|
||||
|
||||
$res = array(); |
||||
foreach($keys as $key){ |
||||
$res[$key] = $redis->get($key); |
||||
} |
||||
|
||||
arsort($res); |
||||
|
||||
foreach($res as $a => $b) |
||||
echo "$a => $b <br>"; |
Loading…
Reference in new issue