larryli / ipv4-medoo
IP v4 中国城市地址库 Medoo 数据库驱动
1.0.0
2015-09-19 06:56 UTC
Requires
- php: >=5.4
- catfan/medoo: ~0.9
- larryli/ipv4: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2024-11-23 19:37:32 UTC
README
通过 composer 安装
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