承接 mallka/easygeo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mallka/easygeo

Composer 安装命令:

composer require mallka/easygeo

包简介

wrapper of geolite2 city/asn and support update db file

README 文档

README

中文说明

features

  1. Update ip db file
  2. Wrapper of geolite city & asn , it will return an array include city & asn info.

Update ip db file

Get your licenser_key from your maxmind account.and then run the code as bellow

<?php
use mallka\easygeo\Geo;
\mallka\easygeo\Geo::update('Your key','/path/to/your_db_floder');

Get extra info of ip

<?php
use mallka\easygeo\Geo;
$res = \mallka\easygeo\Geo::getInfo('113.110.215.242','./store/GeoLite2-City.mmdb','./store/GeoLite2-ASN.mmdb',$lang='zh-CN');
$res = json_encode($res);

/**
$res will display as bellow:
{
    "city":"深圳市",
    "continent":"亚洲",
    "country":"中国",
    "registered_country":"中国",
    "province":"广东",
    "country_code":"CN",
    "province_code":"GD",
    "location"":{
        "accuracy_radius":5,
        "latitude":22.5333,
        "longitude":114.1333,
        "time_zone":"Asia/Shanghai"
    },
    "autonomous_system_number""":"AS4134",
    "organization"":"ASChinanet"
}
**/

How to install

via composer

composer require mallka/easygeo

via direct download

  1. download the file (include file)
  2. set floder permissions to 777 for store floder when you on linux ,like chmod -Rf 777 store
  3. use it or learn it from test.php

thanks :

  1. tronovav/geoip2-update
  2. maxmind-db/reader

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2021-03-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固