Beispiel #1
0
<!DOCTYPE html>
<html>
  <head>

    <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>";
Beispiel #2
0
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>';
        # movieIcon
        print '<div class="desc">' . $title . '</div>';
        echo '</div>';
        # moviePoster
        echo '<div class="movieDetail" data-id="' . $tm_movie['id'] . '">';
        #			echo '<input type="submit" value="+" class="cAdd" data-id="'.$tm_movie['id'].'">';
        echo '<B>' . $tm_movie['title'] . ' (' . substr($tm_movie['release_date'], 0, 4) . ')</B>';
        echo '<TABLE>';
        echo '<TR><TD>Rating:</TD>  <TD id="Rating"  ></TD></TR>';
        echo '<TR><TD>Genre:</TD>   <TD id="Genre"   ></TD></TR>';