2022-11-18 10:58:35 +01:00

31 lines
615 B
PHP

<?php
$pauline = hash('sha256', 'srifi');
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => "http://recettesiam9.cstb.fr/api-cours/get-hash.php?file=applejack.txt"
));
$ret = curl_exec($curl);
$tab = json_decode($ret);
$file = $tab -> hash;
curl_close($curl);
$curl2 = curl_init();
curl_setopt_array($curl2, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => "http://recettesiam9.cstb.fr/api-cours/get-journal.php?file=$file"
));
$resultsJson = curl_exec($curl2);
curl_close($curl2);
$results = json_decode($resultsJson);
print_r($results);