This PHP library enables you to scrap data from IMDB.com., (*1)
The script is a proof of concept. Itâs mostly working, but you shouldnât use it. IMDb doesnât allow this method of data fetching. I personally do not use or promote this script, youâre fully responsive if youâre using it., (*2)
The technique used is called âweb scrapingâ. This means, if IMDb changes anything within their HTML source, the script is most likely going to fail. I wonât update this regularly, so donât count on it to be working all the time., (*3)
License
The MIT License (MIT), (*4)
Usage
<?php
include_once 'imdb.class.php';
$oIMDB = new IMDB('Movie Title or IMDB URL');
if ($oIMDB->isReady) {
[⊠Do something, see below âŠ]
}
else {
[⊠Movie was not found âŠ]
}
}
?>
Get all available data, (*5)
getAll(), (*6)
Also Known As, (*7)
getAka(), (*8)
Aspect Ratio, (*9)
getAspectRatio(), (*10)
Awards, (*11)
getAwards(), (*12)
Cast, (*13)
getCast($iLimit = 0, $bMore = true) - $iLimit defines the maximum amount of people returned, $bMore if "âŠ" should be added to the string if needed, (*14)
Cast (with links), (*15)
getCastAsUrl($iLimit = 0, $bMore = true, $sTarget = '') - $iLimit defines the maximum amount of people returned, $bMore if "âŠ" should be added to the string if needed, $sTarget defines a target, (*16)
Cast and Character, (*17)
getCastAndCharacter($iLimit = 0, $bMore = true) - $iLimit defines the maximum amount of people returned, $bMore if "âŠ" should be added to the string if needed, (*18)
Cast and Character (with links), (*19)
getCastAndCharacterAsUrl($iLimit = 0, $bMore = true, $sTarget = '') - $iLimit defines the maximum amount of people returned, $bMore if "âŠ" should be added to the string if needed, $sTarget defines a target, (*20)
Certification, (*21)
getCertification(), (*22)
Color, (*23)
getColor(), (*24)
Company, (*25)
getCompany(), (*26)
Company (with links), (*27)
getCompanyAsUrl($sTarget = '') - $sTarget defines a target, (*28)
Country, (*29)
getCountry(), (*30)
Country (with links), (*31)
getCountryAsUrl($sTarget = '') - $sTarget defines a target, (*32)
Creator, (*33)
getCreator(), (*34)
Creator (with links), (*35)
getCreatorAsUrl($sTarget = '') - $sTarget defines a target, (*36)
Director, (*37)
getDirector(), (*38)
Director (with links), (*39)
getDirectorAsUrl($sTarget = '') - $sTarget defines a target, (*40)
Genre, (*41)
getGenre(), (*42)
Genre (with links), (*43)
getGenreAsUrl($sTarget = '') - $sTarget defines a target, (*44)
Language, (*45)
getLanguage(), (*46)
Language (with links), (*47)
getLanguageAsUrl($sTarget = '') - $sTarget defines a target, (*48)
Location, (*49)
getLocation(), (*50)
Location (with links), (*51)
getLocationAsUrl($sTarget = '') - $sTarget defines a target, (*52)
MOVIEmeter, (*53)
getMovieMeter(), (*54)
MPAA, (*55)
getMpaa(), (*56)
Plot Keywords, (*57)
getPlotKeywords(), (*58)
Plot, (*59)
getPlot($iLimit = 0) - $iLimit defines the maximum characters returned, (*60)
Poster, (*61)
getPoster($sSize = 'small', $bDownload = true) - $sSize defines small or big poster size, $bDownload if the poster should be downloaded or not, (*62)
Rating, (*63)
getRating(), (*64)
Release Date, (*65)
getReleaseDate(), (*66)
Runtime, (*67)
getRuntime(), (*68)
Seasons, (*69)
getSeasons(), (*70)
Seasons (with links), (*71)
getSeasonsAsUrl($sTarget = '') - $sTarget defines a target, (*72)
Sound Mix, (*73)
getSoundMix(), (*74)
Tagline, (*75)
getTagline(), (*76)
Title, (*77)
getTitle($bForceLocal = false) - $bForceLocal tries to return the original name of the movie, (*78)
Trailer, (*79)
getTrailerAsUrl($bEmbed = false) - $bEmbed defines if you want to link to player directly or not., (*80)
Url, (*81)
getUrl(), (*82)
User Review, (*83)
getUserReview(), (*84)
Votes, (*85)
getVotes(), (*86)
Writer, (*87)
getWriter(), (*88)
Writer (with links), (*89)
getWriterAsUrl($sTarget = '') - $sTarget defines a target, (*90)
Year, (*91)
getYear(), (*92)
Bugs?
If you run into any malfunctions, feel free to submit an issue. Make sure to enable debugging: const IMDB_DEBUG = true; in imdb.class.php., (*93)