diff --git a/CM & CR/TP/07. Module EDS - Révision par QCM.pdf b/CM & CR/TP/07. Module EDS - Révision par QCM.pdf new file mode 100644 index 0000000..09a4358 Binary files /dev/null and b/CM & CR/TP/07. Module EDS - Révision par QCM.pdf differ diff --git a/CM & CR/TP/TP3/14. Module EDS - Travaux Pratiques API.pdf b/CM & CR/TP/TP3/14. Module EDS - Travaux Pratiques API.pdf new file mode 100644 index 0000000..5ac715c Binary files /dev/null and b/CM & CR/TP/TP3/14. Module EDS - Travaux Pratiques API.pdf differ diff --git a/TD/TD3/a.php b/TD/TD3/a.php new file mode 100644 index 0000000..c5a0510 --- /dev/null +++ b/TD/TD3/a.php @@ -0,0 +1,18 @@ + 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 ''; +} \ No newline at end of file diff --git a/TD/TD3/b.php b/TD/TD3/b.php new file mode 100644 index 0000000..c8fc4b2 --- /dev/null +++ b/TD/TD3/b.php @@ -0,0 +1,17 @@ + 1, + CURLOPT_URL => "http://recettesiam9.cstb.fr/api-cours/test-user.php?user=$pauline" +)); +$resultsJson = curl_exec($curl); + +curl_close($curl); + +$results = json_decode($resultsJson); + +print_r($results); diff --git a/TD/TD3/c.php b/TD/TD3/c.php new file mode 100644 index 0000000..2364cbb --- /dev/null +++ b/TD/TD3/c.php @@ -0,0 +1,30 @@ + 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); diff --git a/TD/TD3/d.php b/TD/TD3/d.php new file mode 100644 index 0000000..9aea98b --- /dev/null +++ b/TD/TD3/d.php @@ -0,0 +1,30 @@ + 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); diff --git a/TD/TD3/e.php b/TD/TD3/e.php new file mode 100644 index 0000000..67b58a7 --- /dev/null +++ b/TD/TD3/e.php @@ -0,0 +1,30 @@ + 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/update-jeton.php?file=$file&user=$pauline" +)); +$resultsJson = curl_exec($curl2); + +curl_close($curl2); + +$results = json_decode($resultsJson); + +print_r($results); diff --git a/TD/TD3/f.php b/TD/TD3/f.php new file mode 100644 index 0000000..7888a02 --- /dev/null +++ b/TD/TD3/f.php @@ -0,0 +1,76 @@ + 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); + + +?> + + + + +journal as $r){ + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
File_idDateAction
' .$r->file_id .'' .date('d/m/Y h:i:s', $r->time) .'' .$r->action .'
'; +} + +?> + + \ No newline at end of file diff --git a/TD/TD3/g.php b/TD/TD3/g.php new file mode 100644 index 0000000..f691615 --- /dev/null +++ b/TD/TD3/g.php @@ -0,0 +1,61 @@ + 1, + CURLOPT_URL => "http://recettesiam9.cstb.fr/api-cours/get-journal-user.php?user=$pauline" +)); +$resultsJson = curl_exec($curl); + +curl_close($curl); + +$results = json_decode($resultsJson); + +?> + + + + +journal as $r){ + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
File_idDateAction
' .$r->file_id .'' .date('d/m/Y h:i:s', $r->time) .'' .$r->action .'
'; +} + +?> + + \ No newline at end of file