Skip to content
Extraits de code Groupes Projets
Valider 752f4715 rédigé par Thomas GUBÉNO's avatar Thomas GUBÉNO
Parcourir les fichiers

fonction getMoviebyID créee et testée

parent 19949d3b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<?php
function getMoviebyID($id)
{
$tmdb_url = 'https://api.themoviedb.org/3/movie/' . $id . '?api_key=7ac6810245f15284418f2a15b9b22225';
$movie_json = file_get_contents($tmdb_url);
$movie_array = json_decode($movie_json, true);
$title = $movie_array['original_title'];
return $title;
}
$title = getMoviebyID(100);
?>
<html>
<head>
<meta charset="utf-8"/>
<title>BingeWatcher</title>
</head>
<body>
<?php
echo $title;
?>
</body>
</html>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter