1. Go to this page and download the library: Download vigicorp/sirene-api 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/ */
vigicorp / sirene-api example snippets
Instance = new Sirene\Client\Api\EtablissementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$siret = "siret_example"; // string | Identifiant de l'établissement (14 chiffres)
$date = "date_example"; // string | Date à laquelle on veut obtenir les valeurs des données historisées
$champs = "champs_example"; // string | Liste des champs demandés, séparés par des virgules
$masquer_valeurs_nulles = true; // bool | Masque (true) ou affiche (false, par défaut) les attributs qui n'ont pas de valeur
try {
$result = $apiInstance->findBySiret($siret, $date, $champs, $masquer_valeurs_nulles);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EtablissementApi->findBySiret: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.