1. Go to this page and download the library: Download noroman/fssp 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/ */
noroman / fssp example snippets
Fssp\Exception\FsspException;
use Fssp\Fssp;
use Fssp\Subject\Physical;
use GuzzleHttp\Exception\GuzzleException;
// полученный токен после регистрации
$token = '[token]';
$birthday = new \DateTime('2000-01-01');
$region = 02;
$p1 = new Physical( 'Фамилия', 'Имя', 'Отчество', new \DateTime('2002-01-01'), 21);
$p2 = new Physical( 'Фамилия2', 'Имя2', '', new \DateTime('2001-01-01'), $region);
$p3 = new Physical( 'Фамилия3', 'Имя3', '', $birthday, $region);
$fssp = new Fssp($token);
// создадим запрос
try {
$response = $fssp->searchGroup([$p1, $p2, $p3]);
} catch (FsspException $e) {
die('error: ' . $e->getMessage());
} catch (GuzzleException $e) {
die('error: ' . $e->getMessage());
}
print_r($response);
// ждем обработки запроса
sleep(10);
// получим результат
try {
$response = $fssp->result($fssp->task());
} catch (GuzzleException $e) {
die('error result: ' . $e->getMessage());
}
print_r($response);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.