PHP Classes
elePHPant
Icontem

PHP GeoHelper API Client: Retrieve location lists using the Geohelper API

Recommend this page to a friend!

  Author Author  
Name: Dmitry Mamontov <contact>
Classes: 15 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 5x


  Detailed description   Download Download .zip .tar.gz  
This package can retrieve location lists using the Geohelper API.

It can send HTTP requests to the Geohelper API to retrieve several types of lists related with geographic locations like for countries list, country cities list, country regions lists and city streets list.

The class can also retrieve other locale dependent information related with phones, service locality and post codes.

Details

Geohelper API PHP client

PHP-client for Geohelper API.

Use API documentation

Requirements

  • PHP 5.3 and above
  • PHP's cURL support

Install

1) Get composer

2) Run into your project directory:

composer require dmamontov/geohelper-api-client-php ~1.0.0

If you have not used composer before, include autoloader into your project.

require 'path/to/vendor/autoload.php';

Usage

Get countries

$client = new \Geohelper\ApiClient(
    'api_key'
);


try {
    $response = $client->countriesList();
} catch (\Geohelper\Exception\CurlException $e) {
    echo "Connection error: " . $e->getMessage();
}

if ($response->isSuccessful()) {
    $countries = isset($response['result']) ? $response['result'] : array();
    foreach ($countries as $country) {
        echo $country['name'];
    }
} else {
    echo sprintf(
        "Error: [HTTP-code %s] %s",
        $response->getStatusCode(),
        $response->getErrorMsg()
    );
}

  Classes of Dmitry Mamontov  >  PHP GeoHelper API Client  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP GeoHelper API Client
Base name: geohelper-api-client
Description: Retrieve location lists using the Geohelper API
Version: -
PHP version: 5
License: BSD License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes
Group folder image Geography Locations, mapping and demographics View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagelib (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  lib  
File Role Description
Files folder imageGeohelper (1 file, 3 directories)

  Files folder image Files  /  lib  /  Geohelper  
File Role Description
Files folder imageException (2 files)
Files folder imageHttp (1 file)
Files folder imageResponse (1 file)
  Plain text file ApiClient.php Class Class source

  Files folder image Files  /  lib  /  Geohelper  /  Exception  
File Role Description
  Plain text file CurlException.php Class Class source
  Plain text file InvalidJsonException.php Class Class source

  Files folder image Files  /  lib  /  Geohelper  /  Http  
File Role Description
  Plain text file Client.php Class Class source

  Files folder image Files  /  lib  /  Geohelper  /  Response  
File Role Description
  Plain text file ApiResponse.php Class Class source

Download Download all files: geohelper-api-client.tar.gz geohelper-api-client.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.