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

18
TD/TD3/a.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://recettesiam9.cstb.fr/api-cours/users.php'
));
$resultsJson = curl_exec($curl);
curl_close($curl);
$results = json_decode($resultsJson);
foreach($results as $result){
echo '<ul>';
echo '<li>' . $result->firstname . ' ' . $result->lastname . '</li>';
echo '</ul>';
}