PHP code example of ayctor / geoapifr

1. Go to this page and download the library: Download ayctor/geoapifr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ayctor / geoapifr example snippets


use GeoApiFr\GeoApiFr;

// Create instance

$instance = new GeoApiFr;

$regions = $instance->get('regions');

// OR

$versailles = GeoApiFr::getInstance()->get('communes', ['nom' => 'versailles']);