PHP code example of aalfiann / imdb-engine

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

    

aalfiann / imdb-engine example snippets



use \aalfiann\IMDB;

$imdb = new IMDB();
$imdb->query    = 'tt3829266';      // ID IMDB Movie { to get video trailer. Default value is true.
echo var_dump($imdb->find()->getMovie());

header('Content-Type: application/json');
echo $imdb->find()->getMovieJson(JSON_PRETTY_PRINT);


use \aalfiann\IMDB;

$imdb = new IMDB();
$imdb->query    = 'The Predator';   // Movie title {not ted
$imdb->userid   = '';               // You can filter by input user id. Ex. Jackie Chan user id is >> nm0000329
$imdb->start    = 1;                // Start number for navigation in many results.
$imdb->itemsperpage = 50;           // You can change this with 50, 100 and 250. Default is 50.
echo var_dump($imdb->search()->getList());

header('Content-Type: application/json');
echo $imdb->search()->getListJson(JSON_PRETTY_PRINT);


use \aalfiann\IMDB;

$imdb = new IMDB();
$imdb->query = 'Audrey Hepburn';    // Artist name {emsperpage = 50;           // You can change this with 50, 100 and 250. Default is 50.
echo var_dump($imdb->searchArtist()->getArtistList());

header('Content-Type: application/json');
echo $imdb->searchArtist()->getArtistListJson(JSON_PRETTY_PRINT);

$imdb->proxy = '12.62.65.30:8124';  // IP:Port server proxy
$imdb->proxyauth = 'user:pass';     // Proxy authentication if any