18 lines
399 B
PHP
18 lines
399 B
PHP
<?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>';
|
|
} |