PHP code example of breuls / tmdb-library

1. Go to this page and download the library: Download breuls/tmdb-library 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/ */

    

breuls / tmdb-library example snippets




$db = TMDB\Client::getInstance('<your api-key>');
$db->adult = true;  // return adult content
$db->paged = false; // merges all paged results into a single result automatically

$title = 'The Matrix';
$year = '1999';

$results = $db->search('movie', array('query'=>$title, 'year'=>$year));

$movie = reset($results);
$images = $movie->posters('300');

$movie = new Movie(10);