Example #1
0
    <title>.</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8" />
</head>
<?php 
include "tmdb_v3.php";
$apikey = "YOUR APIKEY";
$tmdb_V3 = new TMDBv3($apikey);
# Url de las imagenes
echo "URL DE IMAGENES:";
echo "<pre>";
var_dump($tmdb_V3->getImageURL());
echo "</pre>";
# Buscar Pelicula
echo "BUSCA PELICULA";
$buscar = $tmdb_V3->searchMovie('back to the future', 'cl');
echo "<pre>";
print_r($buscar);
echo "</pre>";
# Info de  Pelicula
$idMovie = 11;
#Info
echo "DETALLES DE PELICULA";
$pelinfo = $tmdb_V3->movieDetail($idMovie);
echo "<pre>";
print_r($pelinfo);
echo "</pre>";
#casts
echo "CASTING";
$pelinfo = $tmdb_V3->movieCast($idMovie);
echo "<pre>";
Example #2
0
<?php

include "tmdb_v3.php";
include "omdb_v1.php";
$apikey = "ab6e8dd491403ef61a74448dc97f1e70";
print '<div id="movieLibraryContainer" class="contentContainer">';
echo '<div class="searchMovie">';
echo '<input type="text" name="title" placeholder="Titel" size="100" hight="32px" id="cTSearch" value="' . $_POST['cTitle'] . '"/>';
echo '<button class="searchbutton" id="bTSearch"/>';
echo '</div>';
if ($_POST['cTitle'] != '') {
    $tmdb_V3 = new TMDBv3($apikey, 'de');
    $tm_search = $tmdb_V3->searchMovie($_POST['cTitle']);
    #		echo"<pre>";echo_r($tm_search);echo"</pre>";
    foreach ($tm_search['results'] as $tm_movie) {
        #			echo"<pre>";echo_r($tm_movie);echo"</pre>";
        $title = $tm_movie['title'];
        if (strlen($title) > 26) {
            $title = substr($title, 0, 23) . "...";
        }
        print '<div class="divTST">';
        print '<div class="moviePoster">';
        if (empty($tm_movie['poster_path'])) {
            $cover = 'images/nocover.png';
        } else {
            $cover = $tmdb_V3->getImageURL("w185") . $tm_movie['poster_path'];
        }
        echo '<img class="cover" src="' . $cover . '" height="278" width="185">';
        print '<div class="movieIcon">';
        echo '<img class="cVAdd" data-id="' . $tm_movie['id'] . '" data-state="0" src="images/plus.png">';
        print '</div>';