Welcome Guest, Not a member yet? Register   Sign In
Codeigniter GeoLib
#1

Hello, I've created this Code-igniter library, might be helpfull for someone looking for such functionality. 

Codeigniter GeoLib

Github Repo

A CodeIgniter Geo library for getting 
  • IP location data
  • Currency conversion
  • User agent parsing.

Features

  1. Request API info from the geoPlugin API.
  2. When requesting data from remote API it uses both CURL and file_get_contents (whichever works on your host).
  3. It Provides a wrapper function around core CodeIgniter's user-agent data, so you got all the info in one array and don't have to memorize more stuff.
  4. Accurate, realtim-ish currency conversion using:
    • Yahoo Finance Query API.
    • Google's currency converter.
    • GeoPlugin currency data.
  5. It will first fetch Yahoo's API (since it's an official and efficient API, not based on a hack), then, if failed, it will fallback to Google's currency converter by extracting the data out of an HTML page, then if both failed (highly improbable it will fallback to GeoPlugin's currency data.
  6. You can pass either currency code (e.g. GBP) or country code (e.g. GB) or IP address (e.g. 1.2.3.4) to the currency converter method.
  7. You can pass null as the $to argument to the currency converter method, and it will take your IP and convert the currency from base to your local one. (base = $from).
  8. It has been designed to fit on almost every web host.
 

Github Repo
Reply


Messages In This Thread
Codeigniter GeoLib - by alexcorvi - 07-08-2016, 12:48 PM
RE: Codeigniter GeoLib - by Diederik - 07-09-2016, 12:07 AM
RE: Codeigniter GeoLib - by alexcorvi - 07-09-2016, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB