Есть код
<?php
// create both cURL resources
$ch1 = curl_init();
$ch2 = curl_init();
// set URL and other appropriate options
curl_setopt($ch1, CURLOPT_URL, "https://site.ru/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&token=******&departure_at=" . date('Y-m-d') );
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch2, CURLOPT_URL, "https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=AER&token=*******&departure_at=" . date('Y-m-d') );
curl_setopt($ch2, CURLOPT_HEADER, 0);
//create the multiple cURL handle
$mh = curl_multi_init();
//add the two handles
curl_multi_add_handle($mh,$ch1);
curl_multi_add_handle($mh,$ch2);
$ch1 = json_decode($response, true);
$ch2 = json_decode($response, true);
//execute the multi handle
do {
$status = curl_multi_exec($mh, $active);
if ($active) {
curl_multi_select($mh);
}
} while ($active && $status == CURLM_OK);
//close the handles
curl_multi_remove_handle($mh, $ch1);
curl_multi_remove_handle($mh, $ch2);
curl_multi_close($mh);
?>
<div class="table-responsive" style="overflow-x:hidden;background: var(--responsiv-color)!important; display: flex; flex-direction: column; width: 100%;margin-left: auto; margin-right: auto; list-style-type: none;overflow-y:hidden;">
<?php
if (isset($mh['data']) && is_array($mh['data']))
{
foreach ($mh['data'] as $key => $dataGOI){
?>
<ul class="ticket">
<li class="tickets_name"><p style="color:black;">Москва — Гоа</p> <span class="tickets_span">Рейс: <?=$dataGOI['flight_number'] ?> MOW — GOI</span></li>
<li class="li"><p><?php if($dataGOI['airline'] == null) echo "Обновление"; else echo "<img width='100' height='50' alt='авиакомпания на рейс Москва — Гоа' src='//pics.avs.io/100/40/{$dataGOI['airline']}.jpg' class='lazyload air'>" ?></p><span class="tickets_span"> Количество пересадок: <?= $dataGOI['transfers'] > 0 ? $dataGOI['transfers'] : "<span style='color:red'>Без пересадок</span>" ?></span></li>
<li class="li_span"><p style="color:black;"><?php echo $replace_value('departure_at', substr($dataGOI['departure_at'], 0, 10)); ?></p><span style="font-size: 13px!important; font-weight: 400; color: #4e5965!important; font-weight: 300;">Туда</span></li>
<a class="tickets_link" rel="nofollow" rel="noopener" role="button" alt="авиабилеты Москва <?php echo $replace_value('destination', $key); ?>" title="Москва <?php echo $replace_value('destination', $key); ?>" href="https://site.ru/flights/?origin_iata=MOW&destination_iata=<?=$dataGOI['destination'] ?>&depart_date=<?=substr($dataGOI['departure_at'], 0, 10) ?>&marker=87111&with_request=true&search_id=<?=$dataGOI['search_id']?>&signature=<?=$dataGOI['signature']?>"><li>Билеты от <?php echo $replace_value('price', $dataGOI['price']); ?> р. </li></a>
</ul></div>
<?php
}
}
?>
Вместо расшифрованного ответа на странице виден ответ json
{"success":true,"data":[{"origin":"MOW","destination":"LED","origin_airport":"SVO","destination_airport":"LED","price":3500,"airline":"SU","flight_number":"34","departure_at":"2021-07-28T23:15:00+03:00","search_id":"7ba75eb6-c196-4b86-83d8-47efb989865c","signature":"584b66d0c8fd67c42602eb68f24945c7","transfers":0,"return_transfers":0,"duration":85}],"currency":"rub"}{"success":true,"data":[{"origin":"MOW","destination":"AER","origin_airport":"DME","destination_airport":"AER","price":3498,"airline":"S7","flight_number":"2051","departure_at":"2021-07-28T23:55:00+03:00","search_id":"d4e6dc1c-8d5b-4313-9bf9-4460766b131a","signature":"fbc702bd796ae2a39c7e0837c4306a1c","transfers":0,"return_transfers":0,"duration":145}],"currency":"rub"}
Как расшифровать его?
Спасибо