Example #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>";
Example #2
0
<?php

include "tmdb_v3.php";
include "omdb_v1.php";
$apikey = "ab6e8dd491403ef61a74448dc97f1e70";
if ($_GET['id'] != '') {
    $tmdb_V3 = new TMDBv3($apikey, 'de');
    $omdb_V1 = new OMDBv1();
    $tm_info = $tmdb_V3->movieDetail($_GET['id']);
    $om_info = $omdb_V1->movieDetail($tm_info['imdb_id']);
    print '{';
    print '  "id": "' . $_GET['id'] . '",';
    print '  "Rating": "' . $om_info['imdbRating'] . ' (' . $om_info[imdbVotes] . ')",';
    print '  "Genre": "' . $om_info['Genre'] . '",';
    print '  "Director": "' . $om_info['Director'] . '",';
    print '  "Actors": "' . $om_info['Actors'] . '",';
    //		print '  "Plot": "'.addslashes($tm_info['overview']).'"';
    print '  "Plot": "' . addcslashes($tm_info['overview'], '"') . '"';
    print "}";
} else {
    print '{ "id": "-1"}';
}
Example #3
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>';