-
Notifications
You must be signed in to change notification settings - Fork 13
/
example.php
62 lines (52 loc) · 1.62 KB
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
include_once 'imdbapi.class.php';
/*
Add the name of the TV show or Movie as a string into the IMDB constructor.
Examples:
Movie
Terminator 2: Judgment Day (1991)
Terminator 2: Judgment Day 1991
Terminator 2: Judgment Day
Terminator 2
tt0103064
TV Show
Archer 2009
tt1486217
*/
$imdb = new IMDB("Archer 2009");
if($imdb->isReady){
$imdb_api = array();
$imdb_api['castArray'] = $imdb->getCastArray();
// Check to see if the media is a movie or tv series
if ($imdb->isTvShow()) {
$imdb_api['creators'] = $imdb->getCreatorArray();
} else if ($imdb->isVideo()) {
$imdb_api['directorArray'] = $imdb->getDirectorArray();
}
$imdb_api['genreArray'] = $imdb->getGenreArray();
$imdb_api['genreString'] = $imdb->getGenreString();
$imdb_api['mpaa'] = $imdb->getMpaa();
$imdb_api['description'] = $imdb->getDescription();
$imdb_api['plot'] = $imdb->getPlot();
$imdb_api['imdbID'] = $imdb->getImdbID();
$imdb_api['imdbURL'] = $imdb->getUrl();
$imdb_api['poster'] = $imdb->getPoster();
$imdb_api['rating'] = $imdb->getRating();
$imdb_api['runtime'] = $imdb->getRuntime();
$imdb_api['title'] = $imdb->getTitle();
$imdb_api['AKA'] = $imdb->getAka();
$imdb_api['languagesArray'] = $imdb->getLanguagesArray();
$imdb_api['languagesString'] = $imdb->getLanguagesString();
$imdb_api['trailer'] = $imdb->getTrailer();
$imdb_api['isTV'] = $imdb->isTvShow();
$imdb_api['type'] = $imdb->getType();
$imdb_api['year'] = $imdb->getYear();
$imdb_api['userComments'] = $imdb->getUserComments();
$imdb_api['parentalGuide'] = $imdb->getParentalGuide();
echo "<PRE>";
print_r($imdb_api);
echo "</PRE>";
}else{
echo $imdb->status;
}
?>