Overview   Package   Tree   Index 
IMDBPHP
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Api
Class imdb

- imdb_config
-

class imdb
extends imdb_base

Accessing IMDB information

Authors:
Georgos Giagas, Izzy (izzysoft AT qumran DOT org)
Version:
$Revision: 146 $ $Date: 2008-05-31 22:39:02 +0200 (Sa, 31 Mai 2008) $
Copyright:
(c) 2002-2004 by Giorgos Giagas and (c) 2004-2008 by Itzchak Rehberg and IzzySoft

Constructor Summary
void imdb(string $id)
Initialize class

Method Summary
array alsoknow()
Get movies alternative names
array cast()
Get the actors
array colors()
Get colors
string comment()
Get movie main comment (from title page)
array comment_split()
Get movie main comment (from title page - split-up variant)
array composer()
Obtain the composer(s) ("Original Music by...")
array country()
Get country of production
array crazy_credits()
Get the Crazy Credits
array director()
Get the director(s) of the movie
array episodes()
Get the series episode(s)
array extReviews()
Get list of external reviews (if any)
string genre()
There is not really a main genre on the IMDB sites (yet), so this simply returns the first one
array genres()
Get all genres the movie is registered for
private string get_imdbname(string $href)
Get the IMDB ID from a names URL
private array get_row_cels(string $row)
Get content of table row cells
private mixed get_table_rows(string $html, string $table_start)
Get rows for a given table on the page
private mixed get_table_rows_cast(string $html, string $table_start)
Get rows for the cast table on the page
array goofs()
Get the goofs
string language()
There is not really a main language on the IMDB sites (yet), so this simply returns the first one
array languages()
Get all langauges this movie is available in
string main_url()
Set up the URL to the movie title page
array movieconnection()
Get connected movie information
array mpaa()
Get the MPAA data (also known as PG or FSK)
string mpaa_reason()
Find out the reason for the MPAA rating
private array parseConnection(string $conn)
Parse connection block (used by method movieconnection only)
mixed photo([boolean $thumb])
Get cover photo
mixed photo_localurl([boolean $thumb])
Get the URL for the movies cover photo
array plot()
Get the movies plot(s)
array plot_split()
Get the movie plot(s) - split-up variant
string plotoutline()
Get the main Plot outline for the movie
array producer()
Obtain the producer(s)
array quotes()
Get the quotes for a given movie
private void rate_vote()
Setup votes
string rating()
Get movie rating
private void reset_vars()
Reset page vars
mixed runtime()
Get overall runtime (first one mentioned on title page)
private string runtime_all()
Get general runtime
array runtimes()
Retrieve language specific runtimes
boolean savephoto(string $path, [boolean $thumb])
Save the photo to disk
integer seasons()
Get the number of seasons or 0 if not a series
private string set_pagename(string $wt)
Define page urls
array sound()
Get sound formats
array soundtrack()
Usually, the credits array should hold [0] written by, [1] performed by. But IMDB does not always stick to that - so in many cases it holds [0] performed by, [1] courtesy of
string tagline()
Get the main tagline for the movie
array taglines()
Get all available taglines for the movie
boolean thumbphoto()
Setup cover photo (thumbnail and big variant)
string title()
Get movie title
private void title_year()
Setup title and year properties
array trailers()
Get the trailer URLs for a given movie
array trivia()
Get the trivia info
string votes()
Return votes for this movie
array writing()
Get the writer(s)
string year()
Get year

Methods inherited from class imdb_base and not overridden
getWebPage, imdbid, openpage, purge, setid

Constructor Detail

imdb()

void imdb(string $id)

Initialize class

Parameters:
id - IMDBID to use for data retrieval

Method Detail

alsoknow()

array alsoknow()

Get movies alternative names

Returns:
aka array[0..n] of array[title,year,country,comment]; searching on akas.imdb.com will add "lang" (2-char language code) to the array for localized names, "comment" will hold additional countries listed along for these as well as comments: As these things are quite mixed up on the imdb sites, it's hard to tell what is an additional country and what is a comment...

cast()

array cast()

Get the actors

Returns:
cast (array[0..n] of arrays[imdb,name,role])

colors()

array colors()

Get colors

Returns:
colors (array[0..1] of strings)

comment()

string comment()

Get movie main comment (from title page)

Returns:
comment full text of movie comment from the movies main page

comment_split()

array comment_split()

Get movie main comment (from title page - split-up variant)

Returns:
comment array[string title, string date, array author, string comment]; author: array[string url, string name]

composer()

array composer()

Obtain the composer(s) ("Original Music by...")

Returns:
composer (array[0..n] of arrays[imdb,name,role])

country()

array country()

Get country of production

Returns:
country (array[0..n] of string)

crazy_credits()

array crazy_credits()

Get the Crazy Credits

Returns:
crazy_credits (array[0..n] of string)

director()

array director()

Get the director(s) of the movie

Returns:
director (array[0..n] of arrays[imdb,name,role])

episodes()

array episodes()

Get the series episode(s)

Returns:
episodes (array[0..n] of array[0..m] of array[imdbid,title,airdate,plot])

extReviews()

array extReviews()

Get list of external reviews (if any)

Returns:
[0..n] of array [url, desc] (or empty array if no data)

genre()

string genre()

Get the movies main genre Since IMDB.COM does not really now a "Main Genre", this simply means the first mentioned genre will be returned.

Returns:
genre first of the genres listed on the movies main page

genres()

array genres()

Get all genres the movie is registered for

Returns:
genres (array[0..n] of strings)

get_imdbname()

private string get_imdbname(string $href)

Get the IMDB ID from a names URL

Parameters:
href - url to the staff members IMDB page
Returns:
IMDBID of the staff member
See also:
used by the methods director, cast, writing, producer, composer

get_row_cels()

private array get_row_cels(string $row)

Get content of table row cells

Parameters:
row - (as returned by imdb::get_table_rows)
Returns:
cells (array[0..n] of strings)
See also:
used by the methods director, cast, writing, producer, composer

get_table_rows()

private mixed get_table_rows(string $html, string $table_start)

Get rows for a given table on the page

Parameters:
html -
table_start -
Returns:
rows (FALSE if table not found, array[0..n] of strings otherwise)
See also:
used by the methods director, cast, writing, producer, composer

get_table_rows_cast()

private mixed get_table_rows_cast(string $html, string $table_start)

Get rows for the cast table on the page

Parameters:
html -
table_start -
Returns:
rows (FALSE if table not found, array[0..n] of strings otherwise)
See also:
used by the method cast

goofs()

array goofs()

Get the goofs

Returns:
goofs (array[0..n] of array[type,content]

language()

string language()

Get movies original language

Returns:
language

languages()

array languages()

Get all langauges this movie is available in

Returns:
languages (array[0..n] of strings)

main_url()

string main_url()

Set up the URL to the movie title page

Returns:
url full URL to the current movies main page

movieconnection()

array movieconnection()

Get connected movie information

Returns:
connections (versionOf, editedInto, followedBy, spinOff, spinOffFrom, references, referenced, features, featured, spoofs, spoofed - each an array of mid, name, year, comment or an empty array if no connections of that type)

mpaa()

array mpaa()

Get the MPAA data (also known as PG or FSK)

Returns:
mpaa (array[country]=rating)

mpaa_reason()

string mpaa_reason()

Find out the reason for the MPAA rating

Returns:
reason why the movie was rated such

parseConnection()

private array parseConnection(string $conn)

Parse connection block (used by method movieconnection only)

Parameters:
conn - connection type
Returns:
[0..n] of array mid,name,year,comment - or empty array if not found

photo()

mixed photo([boolean $thumb])

Get cover photo

Parameters:
thumb - get the thumbnail (100x140, default) or the bigger variant (400x600 - FALSE)
Returns:
photo (string url if found, FALSE otherwise)

photo_localurl()

mixed photo_localurl([boolean $thumb])

Get the URL for the movies cover photo

Parameters:
thumb - get the thumbnail (100x140, default) or the bigger variant (400x600 - FALSE)
Returns:
url (string URL or FALSE if none)

plot()

array plot()

Get the movies plot(s)

Returns:
plot (array[0..n] of strings)

plot_split()

array plot_split()

Get the movie plot(s) - split-up variant

Returns:
array[0..n] of array[string plot,array author] - where author consists of string name and string url

plotoutline()

string plotoutline()

Get the main Plot outline for the movie

Returns:
plotoutline

producer()

array producer()

Obtain the producer(s)

Returns:
producer (array[0..n] of arrays[imdb,name,role])

quotes()

array quotes()

Get the quotes for a given movie

Returns:
quotes (array[0..n] of string)

rate_vote()

private void rate_vote()

Setup votes


rating()

string rating()

Get movie rating

Returns:
rating current rating as given by IMDB site

reset_vars()

private void reset_vars()

Reset page vars


runtime()

mixed runtime()

Get overall runtime (first one mentioned on title page)

Returns:
string runtime in minutes (if set), NULL otherwise

runtime_all()

private string runtime_all()

Get general runtime

Returns:
runtime complete runtime string, e.g. "150 min / USA:153 min (director's cut)"

runtimes()

array runtimes()

Retrieve language specific runtimes

Returns:
runtimes (array[0..n] of array[time,country,comment])

savephoto()

boolean savephoto(string $path, [boolean $thumb])

Save the photo to disk

Parameters:
path - where to store the file
thumb - get the thumbnail (100x140, default) or the bigger variant (400x600 - FALSE)
Returns:
success

seasons()

integer seasons()

Get the number of seasons or 0 if not a series

Returns:
seasons number of seasons

set_pagename()

private string set_pagename(string $wt)

Define page urls

Parameters:
wt - internal name of the page
Returns:
urlname page URL

sound()

array sound()

Get sound formats

Returns:
sound (array[0..n] of strings)

soundtrack()

array soundtrack()

Get the soundtrack listing

Returns:
soundtracks (array[0..n] of array(soundtrack,array[0..n] of credits)

tagline()

string tagline()

Get the main tagline for the movie

Returns:
tagline

taglines()

array taglines()

Get all available taglines for the movie

Returns:
taglines (array[0..n] of strings)

thumbphoto()

boolean thumbphoto()

Setup cover photo (thumbnail and big variant)

Returns:
success (TRUE if found, FALSE otherwise)

title()

string title()

Get movie title

Returns:
title movie title (name)

title_year()

private void title_year()

Setup title and year properties


trailers()

array trailers()

Get the trailer URLs for a given movie

Returns:
trailers (array[0..n] of string)

trivia()

array trivia()

Get the trivia info

Returns:
trivia (array[0..n] string

votes()

string votes()

Return votes for this movie

Returns:
votes count of votes for this movie

writing()

array writing()

Get the writer(s)

Returns:
writers (array[0..n] of arrays[imdb,name,role])

year()

string year()

Get year

Returns:
year

 Overview   Package   Tree   Index 
IMDBPHP
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Submit a bug

This document was generated by phpdocgen 0.16.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)