composer require larryli/ipv4-medoo
$medoo = new \larryli\ipv4\medoo\Database([
'database_type' => 'sqlite',
'database_file' => __DIR__ . '/ipv4.sqlite',
]);
$monipdb = new \larryli\ipv4\MonipdbQuery(__DIR__ . '/17monipdb.dat');
if (!$monipdb->exists()) {
$monipdb->init();
}
$qqwry = new \larryli\ipv4\QqwryQuery(__DIR__ . '/qqwry.dat');
if (!$qqwry->exists()) {
$qqwry->init();
}
$your_query = new \larryli\ipv4\FullQuery($medoo);
if (!$your_query->exists()) {
$your_query->init(null, $monipdb, $qqwry);
}
$your_query->find(ip2long('127.0.0.1'));
- 核心 larryli/ipv4
- 控制台命令 larryli/ipv4-console
- Yii2 组件 larryli/ipv4-yii2
- Yii2 示例 larryli/ipv4-yii2-sample