PHP Класс IMDB, PHP-IMDB-Grabber

This PHP library enables you to scrap data from IMDB.com. If you want to thank me for this library, please buy me something at Amazon: https://www.amazon.de/gp/registry/wishlist/8840JITISN9L/ - thank you in advance! :)
Автор: Fabian Beiner ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$bArrayOutput Return responses enclosed in array
$iId The ID of the movie.
$isReady Is the content ready?
$sNotFound The string returned, if nothing is found.
$sSeparator Char that separates multiple entries.
$sUrl The URL to the movie.

Открытые методы

Метод Описание
__construct ( string $sSearch, null $iCache = null, string $sSearchFor = 'all' )
getAka ( ) : string
getAkas ( ) : string Returns all local names
getAll ( ) : array
getAspectRatio ( ) : string
getAwards ( ) : string
getCast ( integer $iLimit, boolean $bMore = true ) : string
getCastAndCharacter ( integer $iLimit, boolean $bMore = true ) : string
getCastAndCharacterAsUrl ( integer $iLimit, boolean $bMore = true, string $sTarget = '' ) : string
getCastAsUrl ( integer $iLimit, boolean $bMore = true, string $sTarget = '' ) : string
getCertification ( ) : string
getColor ( ) : string
getCompany ( ) : string
getCompanyAsUrl ( string $sTarget = '' ) : string
getCountry ( ) : string
getCountryAsUrl ( string $sTarget = '' ) : string
getCreator ( ) : string
getCreatorAsUrl ( string $sTarget = '' ) : string
getDirector ( ) : string
getDirectorAsUrl ( string $sTarget = '' ) : string
getGenre ( ) : string
getGenreAsUrl ( string $sTarget = '' ) : string
getLanguage ( ) : string
getLanguageAsUrl ( string $sTarget = '' ) : string
getLocation ( ) : string
getLocationAsUrl ( string $sTarget = '' ) : string
getMpaa ( ) : string
getPlot ( integer $iLimit ) : string
getPlotKeywords ( ) : string
getPoster ( string $sSize = 'small', boolean $bDownload = false ) : boolean | string
getRating ( ) : string
getReleaseDate ( ) : string
getRuntime ( ) : string
getSeasons ( ) : string
getSeasonsAsUrl ( string $sTarget = '' ) : string
getSoundMix ( ) : string
getTagline ( ) : string
getTitle ( boolean $bForceLocal = false ) : string
getTrailerAsUrl ( boolean $bEmbed = false ) : string
getUrl ( ) : string
getUserReview ( ) : string
getVotes ( ) : string
getWriter ( ) : string
getWriterAsUrl ( string $sTarget = '' ) : string
getYear ( ) : string
isReleased ( ) : true Release date doesn't contain all the information we need to create a media and we need this function that checks if users can vote target media (if can, it's released).

Приватные методы

Метод Описание
fetchUrl ( string $sSearch ) : boolean

Описание методов

__construct() публичный Метод

public __construct ( string $sSearch, null $iCache = null, string $sSearchFor = 'all' )
$sSearch string IMDb URL or movie title to search for.
$iCache null Custom cache time in minutes.
$sSearchFor string What to search for?

getAka() публичный Метод

public getAka ( ) : string
Результат string “Also Known As” or $sNotFound.

getAkas() публичный Метод

Returns all local names
public getAkas ( ) : string
Результат string The aka name.

getAll() публичный Метод

public getAll ( ) : array
Результат array All data.

getAspectRatio() публичный Метод

public getAspectRatio ( ) : string
Результат string “Aspect Ratio” or $sNotFound.

getAwards() публичный Метод

public getAwards ( ) : string
Результат string The awards of the movie or $sNotFound.

getCast() публичный Метод

public getCast ( integer $iLimit, boolean $bMore = true ) : string
$iLimit integer How many cast members should be returned?
$bMore boolean Add … if there are more cast members than printed.
Результат string A list with cast members or $sNotFound.

getCastAndCharacter() публичный Метод

public getCastAndCharacter ( integer $iLimit, boolean $bMore = true ) : string
$iLimit integer How many cast members should be returned?
$bMore boolean Add … if there are more cast members than printed.
Результат string A list with cast members and their character or $sNotFound.

getCastAndCharacterAsUrl() публичный Метод

public getCastAndCharacterAsUrl ( integer $iLimit, boolean $bMore = true, string $sTarget = '' ) : string
$iLimit integer How many cast members should be returned?
$bMore boolean Add … if there are more cast members than printed.
$sTarget string Add a target to the links?
Результат string A list with linked cast members and their character or $sNotFound.

getCastAsUrl() публичный Метод

public getCastAsUrl ( integer $iLimit, boolean $bMore = true, string $sTarget = '' ) : string
$iLimit integer How many cast members should be returned?
$bMore boolean Add … if there are more cast members than printed.
$sTarget string Add a target to the links?
Результат string A list with linked cast members or $sNotFound.

getCertification() публичный Метод

public getCertification ( ) : string
Результат string The certification of the movie or $sNotFound.

getColor() публичный Метод

public getColor ( ) : string
Результат string Color or $sNotFound.

getCompany() публичный Метод

public getCompany ( ) : string
Результат string The company producing the movie or $sNotFound.

getCompanyAsUrl() публичный Метод

public getCompanyAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string The linked company producing the movie or $sNotFound.

getCountry() публичный Метод

public getCountry ( ) : string
Результат string A list with countries or $sNotFound.

getCountryAsUrl() публичный Метод

public getCountryAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with linked countries or $sNotFound.

getCreator() публичный Метод

public getCreator ( ) : string
Результат string A list with the creators or $sNotFound.

getCreatorAsUrl() публичный Метод

public getCreatorAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked creators or $sNotFound.

getDirector() публичный Метод

public getDirector ( ) : string
Результат string A list with the directors or $sNotFound.

getDirectorAsUrl() публичный Метод

public getDirectorAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked directors or $sNotFound.

getGenre() публичный Метод

public getGenre ( ) : string
Результат string A list with the genres or $sNotFound.

getGenreAsUrl() публичный Метод

public getGenreAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked genres or $sNotFound.

getLanguage() публичный Метод

public getLanguage ( ) : string
Результат string A list with the languages or $sNotFound.

getLanguageAsUrl() публичный Метод

public getLanguageAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked languages or $sNotFound.

getLocation() публичный Метод

public getLocation ( ) : string
Результат string A list with the location or $sNotFound.

getLocationAsUrl() публичный Метод

public getLocationAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked location or $sNotFound.

getMpaa() публичный Метод

public getMpaa ( ) : string
Результат string The MPAA of the movie or $sNotFound.

getPlot() публичный Метод

public getPlot ( integer $iLimit ) : string
$iLimit integer The limit.
Результат string The plot of the movie or $sNotFound.

getPlotKeywords() публичный Метод

public getPlotKeywords ( ) : string
Результат string A list with the plot keywords or $sNotFound.

getPoster() публичный Метод

public getPoster ( string $sSize = 'small', boolean $bDownload = false ) : boolean | string
$sSize string Small or big poster?
$bDownload boolean Return URL to the poster or download it?
Результат boolean | string Path to the poster.

getRating() публичный Метод

public getRating ( ) : string
Результат string The rating of the movie or $sNotFound.

getReleaseDate() публичный Метод

public getReleaseDate ( ) : string
Результат string The release date of the movie or $sNotFound.

getRuntime() публичный Метод

public getRuntime ( ) : string
Результат string The runtime of the movie or $sNotFound.

getSeasons() публичный Метод

public getSeasons ( ) : string
Результат string A list with the seasons or $sNotFound.

getSeasonsAsUrl() публичный Метод

public getSeasonsAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked seasons or $sNotFound.

getSoundMix() публичный Метод

public getSoundMix ( ) : string
Результат string The sound mix of the movie or $sNotFound.

getTagline() публичный Метод

public getTagline ( ) : string
Результат string The tagline of the movie or $sNotFound.

getTitle() публичный Метод

public getTitle ( boolean $bForceLocal = false ) : string
$bForceLocal boolean Try to return the original name of the movie.
Результат string The title of the movie or $sNotFound.

getTrailerAsUrl() публичный Метод

public getTrailerAsUrl ( boolean $bEmbed = false ) : string
$bEmbed boolean Link to player directly?
Результат string The URL to the trailer of the movie or $sNotFound.

getUrl() публичный Метод

public getUrl ( ) : string
Результат string The IMDb URL.

getUserReview() публичный Метод

public getUserReview ( ) : string
Результат string The user review of the movie or $sNotFound.

getVotes() публичный Метод

public getVotes ( ) : string
Результат string The votes of the movie or $sNotFound.

getWriter() публичный Метод

public getWriter ( ) : string
Результат string A list with the writers or $sNotFound.

getWriterAsUrl() публичный Метод

public getWriterAsUrl ( string $sTarget = '' ) : string
$sTarget string Add a target to the links?
Результат string A list with the linked writers or $sNotFound.

getYear() публичный Метод

public getYear ( ) : string
Результат string The year of the movie or $sNotFound.

isReleased() публичный Метод

Release date doesn't contain all the information we need to create a media and we need this function that checks if users can vote target media (if can, it's released).
public isReleased ( ) : true
Результат true If the media is released

Описание свойств

$bArrayOutput публичное свойство

Return responses enclosed in array
public $bArrayOutput

$iId публичное свойство

The ID of the movie.
public $iId

$isReady публичное свойство

Is the content ready?
public $isReady

$sNotFound публичное статическое свойство

The string returned, if nothing is found.
public static $sNotFound

$sSeparator публичное свойство

Char that separates multiple entries.
public $sSeparator

$sUrl публичное свойство

The URL to the movie.
public $sUrl