HighSpeaker/.history/test_20221224192652.php

25 lines
679 B
PHP
Raw Normal View History

2022-12-24 22:10:40 +08:00
<?php
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/support/bootstrap.php';
use Respect\Validation\Validator as v;
use GeoIp2\Database\Reader;
$reader = new Reader(base_path().'/geoip/GeoLite2-City/GeoLite2-City.mmdb');
$record = $reader->city('119.29.29.29');
print_r($record->country);
/**
use support\Redis;
$redis = Redis::connection('default');
#$redis->hset('User','admin',json_encode(['account' => 'admin', 'email' => 'admin@admin.com', 'passwd' => hash("sha256", 'admin123456'), 'name' => '管理员']));
var_dump($redis->hget('User','enoch'));
**/
#$contenttype=v::ip()->validate('fe8::x');
#var_dump(gethostbyaddr('119.29.29.29'));
?>