PHP Classes
elePHPant
Icontem

PHP IMDB search: Search movies and retrieve information from IMDB

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-03-02 (8 months ago) RSS 2.0 feedNot enough user ratingsTotal: 102 All time: 8,453 This week: 1,068Up
Version License PHP version Categories
imdb-search 1.0The PHP License5.0PHP 5, Searching, Web services, Video
Description Author

This class can search movies and retrieve information from IMDB.

It can send a request to the IMDB Web site to retrieve pages that list movies with a given title and returns the URLs all videos with that title.

The class can also take the URL of a given movie page and retrieves it to parse and extract movie details like the title ID, title name, year, genres, directors, poster images, country, title name alias, and trailer videos.

Picture of Dantigny francois
  Performance   Level  
Name: Dantigny francois <contact>
Classes: 1 package by
Country: France France

Details

PHP-IMDBSearch

find on IMDB.COM some titles like an input title

INPUT :

1 - a title ($_GET['t']),

2 - a country ($_GET['c']) : in order to filter all the titles of the 'movies' ('all' for no filter),

3 - a MoviesTypes ($_GET['g'] & see langages.php : $Types) : to filter only on some 'MoviesTypes'

OUTPUT : '0' if no title match the entry on IMDb.com, else an array:

array(

	imdb_id   : something like tt0456201 <- Id IMDB of the movie
	title     : principal title (depend on country),
	year      : IMDB year of the movie,
	genres    : (string) IMDB genre(s),   [ATTENTION : in french but could be changed]
	directors : (string) IMDB director(s),
	poster    : (string / URL) the biggest IMAGE if exists,
	AKAs      : (string) IMDB also_known_as (depend too on INPUT country),
	video     : (string / URL) IMDB trailer if exists,
	type      : IMDB MoviesTypes,   [ATTENTION : in french but could be changed]
	pere      : IMDB_id for the serie if type=episode,

)

adapted from https://github.com/abhinayrathore/PHP-IMDb-Scraper

TO DO : Try to deceive IMDB.com to persuade him whom we are in France / Italy / else !

ATTENTION : strings - in the output - are filtered on "commas" because trouble with Javascript JSON.parse see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse

  Files folder image Files  
File Role Description
Plain text file imdb.class.php Class IMDB parser
Accessible without login Plain text file imdbsearch.php Example main search file
Accessible without login Plain text file langages.php Conf. for internationalisation
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file README.md Data Auxiliary data
Accessible without login HTML file test.html Output test file

 Version Control Unique User Downloads Download Rankings  
 100%
Total:102
This week:0
All time:8,453
This week:1,068Up