Code Monkey home page Code Monkey logo

php-imdb-grabber's Introduction

PHP IMDb.com Grabber

This PHP library enables you to scrap data from IMDB.com.

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.

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.

License

The MIT License (MIT)

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

getAll()

Also Known As

getAka()

Aspect Ratio

getAspectRatio()

Awards

getAwards()

Cast

getCast($iLimit = 0, $bMore = true) - $iLimit defines the maximum amount of people returned, $bMore if "…" should be added to the string if needed

Cast (with links)

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

Cast and Character

getCastAndCharacter($iLimit = 0, $bMore = true) - $iLimit defines the maximum amount of people returned, $bMore if "…" should be added to the string if needed

Cast and Character (with links)

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

Certification

getCertification()

Color

getColor()

Company

getCompany()

Company (with links)

getCompanyAsUrl($sTarget = '') - $sTarget defines a target

Country

getCountry()

Country (with links)

getCountryAsUrl($sTarget = '') - $sTarget defines a target

Creator

getCreator()

Creator (with links)

getCreatorAsUrl($sTarget = '') - $sTarget defines a target

Director

getDirector()

Director (with links)

getDirectorAsUrl($sTarget = '') - $sTarget defines a target

Genre

getGenre()

Genre (with links)

getGenreAsUrl($sTarget = '') - $sTarget defines a target

Language

getLanguage()

Language (with links)

getLanguageAsUrl($sTarget = '') - $sTarget defines a target

Location

getLocation()

Location (with links)

getLocationAsUrl($sTarget = '') - $sTarget defines a target

MPAA

getMpaa()

Plot Keywords

getPlotKeywords()

Plot

getPlot($iLimit = 0) - $iLimit defines the maximum characters returned

Poster

getPoster($sSize = 'small', $bDownload = true) - $sSize defines small or big poster size, $bDownload if the poster should be downloaded or not

Rating

getRating()

Release Date

getReleaseDate()

Runtime

getRuntime()

Seasons

getSeasons()

Seasons (with links)

getSeasonsAsUrl($sTarget = '') - $sTarget defines a target

Sound Mix

getSoundMix()

Tagline

getTagline()

Title

getTitle($bForceLocal = false) - $bForceLocal tries to return the original name of the movie

Trailer

getTrailerAsUrl($bEmbed = false) - $bEmbed defines if you want to link to player directly or not.

Url

getUrl()

User Review

getUserReview()

Votes

getVotes()

Writer

getWriter()

Writer (with links)

getWriterAsUrl($sTarget = '') - $sTarget defines a target

Year

getYear()

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.

php-imdb-grabber's People

Contributors

fabianbeiner avatar bla0r avatar dialga avatar jmartin82 avatar viniciusgalvao avatar avariya avatar viktorstiskala avatar bonk-se avatar fzerorubigd avatar mali11011 avatar

Watchers

James Cloos avatar Marcelo Vani avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.