PHP code example of macklus / yii2-themdb
1. Go to this page and download the library: Download macklus/yii2-themdb 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/ */
macklus / yii2-themdb example snippets
use macklus\themdb\Tmdbapi;
class SiteController extends Controller
{
public function actionTest()
{
$tmdb = new Tmdbapi();
$tmdb->api_key = '__INSERT_HERE_YOUR_API_KEY__';
if ($tmdb->getTvSeason(46952, 3, ['language' => 'es'])) {
print_R($tmdb->data);
} else {
echo 'error';
}
// Find something by his imdb_id
$tmdb->findByExternal('imdb_id', 'tt0816692', ['language' => 'es']);
}
}