Giter Site home page Giter Site logo

powerstone-gh / free-geolocation-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13 KB

Powerstone's free geolocation API

Home Page: https://developers.powerstonegh.com

License: Creative Commons Zero v1.0 Universal

PHP 100.00%
currency-exchange-rates free-api geolocation-api

free-geolocation-api's Introduction

free-geolocation-api

Powerstone Geolocator is a 100% free API developed by PTS Technologies to help developers find the geolocation of any given IP address with ease and it can also display the real-time exchange rate of the country's currency, the API is very easy to use and compatible with your web and mobile apps.
Please note that you will need a free API key from https://developers.powerstonegh.com in order to be able to use this free software, it's easy to generate and it's free.
What can Powerstone Geolocator do for you? Here is a simple wrap up of it's features:
Find the geographical location of your app user or website visitor with the help of their IP address using our JSON API.
You can also be able to display the USD equivalent of any product to your users in real time using the software's live exchange rate converter which is updated hourly.
For a full list of the response properties, check out the documentation here: https://developers.powerstonegh.com/doc
Also do not forget to check our terms of service: https://developers.powerstonegh.com/tos feel free to report bugs or add suggestions, cheers.
SAMPLE TUTORIAL

<?php
//Powerstone Geolocator API
$PowerstoneURL='https://developers.powerstonegh.com/api?ip={IP_ADDRESS}&key={YOUR_API_KEY}';
$details = file_get_contents($PowerstoneURL);
//Decode JSON response
$data = json_decode($details);
$ex_rate = $data->{'exchange_rate'}; //You can now use exchange rate $ex_rate anywhere in your project
$country_code = $data->{'country_code'}; //You can now use $country_code anywhere in your project
$country = $data->{'country_name'}; //You can now use $country anywhere in your project
$flag = $data->{'country_flag'}; //You can now use $flag anywhere in your project like so echo '<img src="'.$flag.'" alt="'.$country.'">';
$region = $data->{'country_subdivision'}; //You can now use $region anywhere in your project
$city = $data->{'city'}; //You can now use $city anywhere in your project
$currency = $data->{'currency'}; //You can now use $currency anywhere in your project
$continent = $data->{'continent_name'}; //You can now use $continent anywhere in your project
$longitude = $data->{'longitude'}; //You can now use $longitude anywhere in your project
$latitude = $data->{'latitude'}; //You can now use $latitude anywhere in your project
$local_time = $data->{'country_date_time'}; //You can now use $local_time anywhere in your project
$timezone = $data->{'time_zone'}; //You can now use $timezone anywhere in your project
?>

free-geolocation-api's People

Contributors

powerstone-gh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.