Codeigniter GeoLib |
-
alexcorvi
Newbie
-
Posts: 2
Threads: 1
Joined: Jul 2016
Reputation:
0
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
- Request API info from the geoPlugin API.
- When requesting data from remote API it uses both CURL and file_get_contents (whichever works on your host).
- 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.
- Accurate, realtim-ish currency conversion using:
- Yahoo Finance Query API.
- Google's currency converter.
- GeoPlugin currency data.
- 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.
- 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.
- 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).
- It has been designed to fit on almost every web host.
Github Repo
|
Messages In This Thread |
Codeigniter GeoLib - by alexcorvi - 07-08-2016, 12:48 PM
|