2amigos/egeoip 问题修复 & 功能扩展

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

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

2amigos/egeoip

Composer 安装命令:

composer require 2amigos/egeoip

包简介

This extension allows you to easily integrate the geoPlugin webservice into your Yii applications.

README 文档

README

EGeoIp Extension uses geoPlugin free webservice to locate IP geo information

This extension allows you to easily integrate the geoPlugin webservice into your Yii applications.

##What is geoPlugin? geoPlugin offers you, the webmaster, the ability to easily geo-localize your visitor down to the city they are in, know what currency they use and the up-to-date currency exchange rate of their currency versus yours.

##Requirements

Developed with Yii 1.1.6

##Usage

Unpack the contents of the extension to your protected/extensions directory. Once you do that, the following is an example on how to use it:

Yii::import('ext.EGeoIP');

$geoIp = new EGeoIP();

$geoIp->locate('88.27.28.44'); // use your IP

echo 'Information regarding IP: <b>'.$geoIp->ip.'</b><br/>';
echo 'City: '.$geoIp->city.'<br>';
echo 'Region: '.$geoIp->region.'<br>';
echo 'Area Code: '.$geoIp->areaCode.'<br>';
echo 'DMA: '.$geoIp->dma.'<br>';
echo 'Country Code: '.$geoIp->countryCode.'<br>';
echo 'Country Name: '.$geoIp->countryName.'<br>';
echo 'Continent Code: '.$geoIp->continentCode.'<br>';
echo 'Latitude: '.$geoIp->latitude.'<br>';
echo 'Longitude: '.$geoIp->longitude.'<br>';
echo 'Currency Symbol: '.$geoIp->currencySymbol.'<br>';
echo 'Currency Code: '.$geoIp->currencyCode.'<br>';
echo 'Currency Converter: '.$geoIp->currencyConverter.'<br/>';

echo 'Converting $10.00 to '.$geoIp->currencyCode.': <b>'.$geoIp->currencyConvert(10).'</b><br/>';

##Note

Please make use of the forum post to report errors, requests, and suggestions. Let comments on this extension for coding hints.

##Resources

2amigOS!
web development has never been so fun
www.2amigos.us - under construction -

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-02-26