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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 223 All time: 8,142 This week: 182Up
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
Age: ???
All time rank: 4018100 in France France
Week rank: 981 Up33 in France France Up



find on IMDB.COM some titles like an input title


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, else an 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

TO DO : Try to deceive 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

  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 Data Auxiliary data
Accessible without login HTML file test.html Output test file

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,142
This week:182Up
For more information send a message to info at phpclasses dot org.