This commit is contained in:
2022-11-18 10:58:35 +01:00
parent a655ebe44d
commit 21d6c67985
9 changed files with 262 additions and 0 deletions

30
TD/TD3/c.php Normal file
View File

@@ -0,0 +1,30 @@
<?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-jeton.php?file=$file&user=$pauline"
));
$resultsJson = curl_exec($curl2);
curl_close($curl2);
$results = json_decode($resultsJson);
print_r($results);