承接 fernleafsystems/apiwrappers-geoip 相关项目开发

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

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

fernleafsystems/apiwrappers-geoip

最新稳定版本:2.0.1

Composer 安装命令:

composer require fernleafsystems/apiwrappers-geoip

包简介

README 文档

README

PHP Wrappers for Geo IP/Location APIs

Installation

To get started, add the package to your project by issuing the following command:

composer require fernleafsystems/apiwrappers-ipstack

Redirect.li - Getting Started

Very simple to use. As with all our API you define a Connection to the API first, then inject this into the various API components as you need.

In this case:

	use FernleafSystems\ApiWrappers\GeoIP\Redirectli;

	$oConn = new Redirectli\Connection();
	$oIpCountry = ( new Redirectli\Geo\Lookup() )
			->setConnection( $oConn )
			->me();

This will return an IpGeoVO object that contains all the information for your IP.

GeoJS - Getting Started

Very simple to use. As with all our API you define a Connection to the API first, then inject this into the various API components as you need.

In this case:

	use FernleafSystems\ApiWrappers\GeoIP\GeoJS;

	$oConn = new GeoJS\Connection();
	$oIpCountry = ( new GeoJS\Country\Lookup() )
			->setConnection( $oConn )
			->me();

This will return an IpCountryVO object that contains all the country information for your IP. If you want more detailed info, use GeoJS\Geo\Lookup instead of GeoJS\Country\Lookup

You can look up single IPs or multiple IPs. And in this case you'll get back an array of VOs.

	use FernleafSystems\ApiWrappers\GeoIP\GeoJS;

	$oConn = new GeoJS\Connection();
	$oIpCountry = ( new GeoJS\Geo\Lookup() )
			->setConnection( $oConn )
			->ips( [ '1.1.1.1', '8.8.8.8' ] );

IPStack - Getting Started

Very simple to use. As with all our API you define a Connection to the API first, then inject this into the various API components as you need.

In this case:

	use FernleafSystems\ApiWrappers\GeoIP\IPStack;

	$oConn = new IPStack\Connection();
	$oConn->api_key = 'your_ipstack_api_key';
    
    /** @var IPStack\IP\GeoIpVO $oIp */
	$oIP = ( new IPStack\IP\Lookup() )
			->setConnection( $oConn )
			->ip( '123.123.123.123' );

In this case $oIP will be a GeoIpVO object with all the properties defined for that class.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-04-10