PHP code example of zerosuxx / tmdb-api-client

1. Go to this page and download the library: Download zerosuxx/tmdb-api-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zerosuxx / tmdb-api-client example snippets


use GuzzleHttp\Client;
use App\Client\TheMovieDatabaseApiClient;

new TheMovieDatabaseApiClient($httpClient, $apiToken);

$pageNumber = 10;
$movies = $tmdbClient->fetchTopRatedMovies($pageNumber);
$movieDetails = $tmdbClient->fetchMovieDetails($movies[0]['id']);