wakumaku/ip2c 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

wakumaku/ip2c

Composer 安装命令:

composer require wakumaku/ip2c

包简介

Small and simple library to resolve the country where an Ip comes from.

README 文档

README

Codacy Badge Build Status Code Coverage Scrutinizer Code Quality

Ip2c is a small php library to retrieve the country where an Ip comes from.

This library uses http://ip2c.org as a service.

Installation

Prerequisites

Ip2c requires PHP 5.3.3 or greater.

If you want to run the tests you'll need a greater one (>=5.5)

Setup through composer

First, add Ip2c to the list of dependencies inside your composer.json:

{
    "require": {
        "wakumaku/ip2c": "dev-master"
    }
}

Composer update:

$> composer update

How to use it

include vendor/autoload.php';

$ip2c = \Ip2c\Ip2cFactory::build();

$result = $ip2c->self();

echo "Status: " . $result->status() . "\n";
echo "Iso2: " . $result->iso2() . "\n";
echo "Iso3: " . $result->iso3() . "\n";
echo "Name: " . $result->name() . "\n";

Output:

    Status: 1
    Iso2: ES
    Iso3: ESP
    Name: Spain

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: to
  • 更新时间: 2015-12-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固