PHP Classes
elePHPant
Icontem

IMDb_Fetch: Retrieve information about movies from IMDB

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-09-26 (9 years ago) RSS 2.0 feedStarStarStarStar 71%Total: 1,244 All time: 2,966 This week: 1,113Up
Version Licenses PHP version Categories
imdb_fetch 0.9Free for non-comm...5.0PHP 5, Web services, Video
Description Author

This class can be used to retrieve information about movies from the IMDB site (Internet Movie DataBase).

It can access the IMDB site pages and extract several types of information about given movies like: the title, year, cast, poster image, etc..

The class can optionally cache the retrieved information in a MySQL database. The movie poster images can be cached on files.

Picture of Mikael
Name: Mikael <contact>
Classes: 3 packages by
Country: Norway Norway

Details
   
                                                                 
   
   
                   Copyright notice and creds					  
   
   
                                                                 
  A class to retrive information out from IMDb about movies.     
  Select what information to fetch for yourself. 				  
  Add as many movies as you like.								  
                                                                 
  Copyrighted by Mikael Brevik @ http://mikaelb.net/             
                                                                 
                                                                 
   
   
                   IMPORTANT ::: Disclaimer					  
   
   
                                                                 
  You MUST read through the "License and Site Access" section    
  of IMDb's "Copyright and Conditions of Use" site before 		  
  doing anything with this!									  
                                                                 
  Be sure that you don't break any rules or statments in their   
  licensing.                                                     
                                                                 
  I, Mikael Brevik, will take NO responsibility for your 		  
  actions if you deside to break with any of these rules. 		  
  Don't do anything illegal or use this class for illegal		  
  purposes.                                                      
                                                                 
   
   
  
  
   
                         Installation:
   
  There is only one step, and it only counts if you are to be 
  using mysql-caching:
   - Import the SQL-file in the compressed folder into your 
  database. Do so through tools as phpMyAdmin or others
   
   
                              Usage
   
  
  If you are using MySQL caching you must connect to MySQL and 
  select DB before running any processing methods in the class.
  
  Also if you deside to use UTF-8, run these codes:
  
  // UTF-8 Fix
  header('Content-Type: text/html; charset=utf-8');
 
 	if($imdb->activate_mysql_cache) {
 		mysql_query("SET NAMES utf8");
 	}
  
   
  You also might want to add a notice to the user that non-cached
  movies will take some time to load.


  Example of getting:
   - all info out of one movie (or more):
  
  $imdb = new IMDb_Fetch ('The Boondock Saints');
  $imdb->all_details = true;
  
  print_r($imdb->get_result_array());
  
   
  
  Example of getting:
  
   - rating, name, 4 of the cast and year of production 
  from X movies:
  
  $imdb = new IMDb_Fetch ();
  $imdb->from_title = array ('tt0123456', 'The Boondock Saints');
  $imdb->add_movie('Disturbia');
  $imdb->show_year = true;
  $imdb->show_cast = 4;
  $imdb->show_rating = true;
  
  print_r($imdb->get_result_array());
  
  
  Example of getting:
   - 10 videos from your Vote History with all details
  
  $imdb = new IMDb_Fetch ();
  $imdb->add_movie($imdb->get_votehistory('USERID', 10));
  $imdb->all_details = true
  
  print_r($imdb->get_result_array());
  
  (Vote history must be public!)
  
   
   
  
  The formating of the results is something you must take 
  care of on your own.
  
   
   
   
  Use the class with care and please put a link to my site		  
  from the site that uses the script. My blog is at        	  
  http://mikaelb.net                                       	  
   
  Files folder image Files  
File Role Description
Plain text file IMDb_Fetch.class.php Class The Main class
Accessible without login Plain text file imdb_create.sql Data MySQL tables for cache
Accessible without login Plain text file README.txt Doc. Readme file for class
Accessible without login Plain text file example_output.txt Output Example of the output
Accessible without login Plain text file example1.php Example Example script #1

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,244
This week:0
All time:2,966
This week:1,113Up
 User Ratings  
 
 All time
Utility:91%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:71%StarStarStarStar
Rank:245