Changes between Version 11 and Version 12 of MovieDetails

Show
Ignore:
Timestamp:
04/26/10 20:46:29 (5 months ago)
Author:
izzy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • MovieDetails

    v11 v12  
    1919#!php 
    2020<?php 
    21 require_once("imdb.class.php");    // include the class file 
     21require_once("imdb.class.php");    // include the class file. For Moviepilot: pilot.class.php 
    2222$movie   = new imdb($mid);         // create an instance of the class and pass it the IMDB ID 
     23                                   // For Moviepilot: new pilot($mid) 
    2324$title   = $movie->title();        // retrieve the movie title 
    2425$year    = $movie->year();         // obtain the year of production 
     
    3940 
    4041||= Step =||= Process =|| 
    41 ||require_once("imdb.class.php");||The class file will be included into your current script. This implicitly includes all classes it depends upon, such as the `imdb_base.class.php`.|| 
     42||require_once("imdb.class.php");||The class file will be included into your current script. This implicitly includes all classes it depends upon, such as the `mdb_base.class.php`.|| 
    4243||new imdb($mid);||This will create a new instance of the imdb class, and set the IMDB ID for the movie to process at the same time.|| 
    4344||$movie->title();||The movies title page will be accessed. Since it was not retrieved before, this will result in requesting the page from the configured IMDB site. If caching is enabled, the page will be stored in the cache. The page will for sure be held in a class variable. This variables content will be parsed for the movie title, which is then also kept in another variable - and returned to the calling process.|| 
     
    4849||$movie->trailers();||This will access a new page, and thus be processed as `$movie->title()` above.|| 
    4950 
    50 This example shows that we try to access the IMDB site as little as possible. 
     51This example shows that we try to access external pages as little as possible. 
    5152Processing the same page with the same IMDB ID again would access the pages from 
    5253the cache (if enabled) instead of retrieving them again from the IMDB site.