PHP code example of jeromeklam / freeapi

1. Go to this page and download the library: Download jeromeklam/freeapi 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/ */

    

jeromeklam / freeapi example snippets


    $api_cfg = [
        'key'    => '<customer key>',
        'secret' => '<customer secret>',
        'path'   => '<token store path>' 
    ];
    $api     = \FreeAPI\INSEE\Sirene\Siret::getInstance($api_cfg);
    $result  = $api->find(['nom' => '*zoo*', 'ville' => 'amneville']);
    foreach ($result as $unEtablissement) {
        ...
    }