Answer the question
In order to leave comments, you need to log in
How to connect to the Crown API service and get a response from it with parameters?
Hello!
Please help to connect with the Crown API service and get a response from it with parameters.
function api_korona_connect($api_url)
{
$connection_c = curl_init(); // initializing
curl_setopt($connection_c, CURLOPT_URL, $api_url); // API URL to connect
curl_setopt($connection_c, CURLOPT_RETURNTRANSFER, 1); // return the result, do not print
curl_setopt($connection_c, CURLOPT_TIMEOUT, 30);
$json_return = curl_exec($connection_c); // connect and get json data
ob_start();
print_r($json_return);
curl_close($connection_c); // close connection
return json_decode($json_return);
// decode and return
}
$PimsCreateURL = 'https://ias.demo.korona.net/pims/v2/pims-create'; //URL для API PIMS-CREATE
$CdasURL = 'https://ias.demo.korona.net/cdas/v3x'; //URL для API CDAS
$netId = 323269; //Идентификатор сети в ПЦ
$connectTimeout = 5;//Таймаут на подключение для всех API
$sendRecvTimeout = 30; //Таймаут на ожидание ответа для всех API
$certFilePath = '../certs/NET323269.pem'; //Файл с открытым и закрытым ключем для всех API
$CAFilePath = './certs/CA.pem'; //Файл корневых сертфикатов для всех API
$return = api_korona_connect('https://ias.demo.korona.net//cdas/v3?pan=7780000000000001&net=5555&tx_history=2');
Answer the question
In order to leave comments, you need to log in
with such requests, look for a freelance artist or adapt plugins from other cms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question