2017 © Pedro Peláez
 

library imdbphp

Library for retrieving film and tv information from IMDb

image

mrcnpdlk/imdbphp

Library for retrieving film and tv information from IMDb

  • Saturday, December 9, 2017
  • by mrcnpdlk
  • Repository
  • 0 Watchers
  • 0 Stars
  • 227 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 46 Forks
  • 0 Open issues
  • 35 Versions
  • 11 % Grown

The README.md

Fork from tboothman/imdbphp - PHP 7 support - PSR16 cache support, (*1)

imdbphp

PHP library for retrieving film and TV information from IMDb. Retrieve most of the information you can see on IMDb including films, TV series, TV episodes, people. Search for titles on IMDb, including filtering by type (film, tv series, etc). Download film posters and actor images., (*2)

Quick Start

  • Include imdbphp/imdbphp using composer, clone this repo or download the latest release zip.
  • Find a film you want the metadata for e.g. Lost in translation http://www.imdb.com/title/tt0335266/
  • If you're not using composer or an autoloader include bootstrap.php.
  • Get some data
$title = new \Imdb\Title(335266);
$rating = $title->rating();
$plotOutline = $title->plotoutline();

Installation

This library scrapes imdb.com so changes their site can cause parts of this library to fail. You will probably need to update a few times a year. Keep this in mind when choosing how to install/configure., (*3)

For notifications of new releases try Sibbell, (*4)

Install the files: * Composer (recommended). Include the imdbphp/imdbphp package. * Git clone. Checkout the latest release tag., (*5)

Install/enable the curl PHP extension, (*6)

Configuration

LogInterface Psr\Log\LoggerInterface

$oInstanceLogger = new \Monolog\Logger('IMDB');
$oInstanceLogger->pushHandler(new \Monolog\Handler\ErrorLogHandler(
        \Monolog\Handler\ErrorLogHandler::OPERATING_SYSTEM,
        \Psr\Log\LogLevel::DEBUG
    )
);

CacheInterface (PSR16) Psr\SimpleCache\CacheInterface

$oInstanceCacheRedis = new \phpFastCache\Helper\Psr16Adapter(
    'redis',
    [
        "host"                => null, // default localhost
        "port"                => null, // default 6379
        'defaultTtl'          => 3600 * 24, // 24h
        'ignoreSymfonyNotice' => true,
    ]);

Dependency injection

$oImdb = new Imdb\TitleSearch(null,$oInstanceLogger,$oInstanceCacheRedis);

Searching for a film

// include "bootstrap.php"; // Load the class in if you're not using an autoloader
$search = new \Imdb\TitleSearch(); // Optional $config parameter
$results = $search->search('The Matrix', [\Imdb\TitleSearch::MOVIE]); // Optional second parameter restricts types returned

// $results is an array of Title objects
// The objects will have title, year and movietype available
//  immediately, but any other data will have to be fetched from IMDb
foreach ($results as $result) { /* @var $result \Imdb\Title */
    echo $result->title() . ' ( ' . $result->year() . ')';
}

Searching for a person

// include "bootstrap.php"; // Load the class in if you're not using an autoloader
$search = new \Imdb\PersonSearch(); // Optional $config parameter
$results = $search->search('Forest Whitaker');

// $results is an array of Person objects
// The objects will have name available, everything else must be fetched from IMDb
foreach ($results as $result) { /* @var $result \Imdb\Person */
    echo $result->name();
}

The Versions

09/12 2017

dev-master

9999999-dev

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

imdb

09/12 2017

v6.0.0

6.0.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

imdb

09/12 2017

dev-devel

dev-devel

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

21/01 2017

v5.0.3

5.0.3.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

21/01 2017

dev-soundtrack

dev-soundtrack

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

14/12 2016

v5.0.2

5.0.2.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

10/12 2016

v5.0.1

5.0.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

16/10 2016

v5.0.0

5.0.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

14/09 2016

v4.1.1

4.1.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

21/07 2016

v4.1.0

4.1.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

17/07 2016

v4.0.1

4.0.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/07 2016

v4.0.0

4.0.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

17/04 2016

v3.3.0

3.3.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

01/02 2016

v3.2.0

3.2.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

27/01 2016

v3.1.5

3.1.5.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

13/01 2016

v3.1.4

3.1.4.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

12/12 2015

v3.1.2

3.1.2.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

28/11 2015

v3.1.1

3.1.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

21/11 2015

v3.1.0

3.1.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

04/11 2015

v3.0.2

3.0.2.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

17/06 2015

v3.0.1

3.0.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

08/06 2015

v3.0.0

3.0.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.3

 

The Development Requires

19/05 2015

v2.6.1

2.6.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

03/05 2015

v2.6.0

2.6.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

25/03 2015

v2.5.0

2.5.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

02/01 2015

v2.4.1

2.4.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

13/12 2014

v2.4.0

2.4.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

21/11 2014

v2.3.6

2.3.6.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

02/11 2014

v2.3.5

2.3.5.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

11/10 2014

v2.3.4

2.3.4.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

21/08 2014

2.3.3

2.3.3.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

05/08 2014

2.3.2

2.3.2.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

04/08 2014

2.3.1

2.3.1.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires

31/07 2014

2.2.4

2.2.4.0

  Sources   Download

31/07 2014

2.3.0

2.3.0.0

Library for retrieving film and tv information from IMDb

  Sources   Download

GPL-2.0

The Requires

  • php >5.0

 

The Development Requires