New PHP Class: IMDb_Fetch

Version: 0.9.0.1

Changelog: Version: 0.9.0.1

Added a seperate example file.

Added more information into the README

Removed the load/unload notice

Downloads: 375

Download IMDb_Fetch.zip

A long description in Norwegian:
Fra NWF

This package is now also added to the PHP Classes network.

(Following is taken from the readme)

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.

Rights

This script is protected by Norwegian law. You may not copy it partialy or pass it on as your own. It's not allowd to use this script in a commercial project without asking for permission.

Please link to my site if used. The script can not be used on sites with rasistic content or containing pornography.

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:

PHP:
  1. // UTF-8 Fix
  2. header('Content-Type: text/html; charset=utf-8');
  3.  
  4. if($imdb->activate_mysql_cache) {
  5.     mysql_query("SET NAMES utf8");
  6. }

Example of getting:

- all info out of one movie (or more):

PHP:
  1. $imdb = new IMDb_Fetch ('The Boondock Saints');
  2. $imdb->all_details = true;
  3.  
  4. print_r($imdb->get_result_array());

Example of getting:

- rating, name, 4 of the cast and year of production
from X movies:

PHP:
  1. $imdb = new IMDb_Fetch ();
  2. $imdb->from_title = array ('tt0123456', 'The Boondock Saints');
  3. $imdb->add_movie('Disturbia');
  4. $imdb->show_year = true;
  5. $imdb->show_cast = 4;
  6. $imdb->show_rating = true;
  7.  
  8. print_r($imdb->get_result_array());

Example of getting:

- 10 videos from your Vote History with all details

PHP:
  1. $imdb = new IMDb_Fetch ();
  2. $imdb->add_movie($imdb->get_votehistory('USERID', 10));
  3. $imdb->all_details = true
  4.  
  5. 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

3 responser om “New PHP Class: IMDb_Fetch”

  1. This seems a nice class. I wrote something similar a couple of years ago. Just have in mind that some servers do not support fopen(); In that case try using CURL. I have a pretty good CURL function that does the job right. Also it sends the 'googlebot' as the useragent to avoid getting banned from some services. If you want any help with it drop me a line.


  2. Hey. Yeah. Ive thought of that some servers doesnt support the fopen-wrapper. So the next version of the class will be based on cURL. I have something ready already, with correct HTTP-headers. But if you let me have a look at yours that would be great. Send me an e-mail @ mikaelb AT mikaelb DOT net

    Thanks for commenting.


  3. [...] read more | digg story [...]


Legg igjen respons

Fyll ut alle felt markert med *

Brukerinformasjon
  1. Kan bruke følgende html: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> og [html] [css], [mysql] og [php] Hold posten ren og fin!

    Siter valgt tekst

E-post-varsel uten å skrive kommentar.

Info om posten

Innlegget ble postet 26.09.07 01:37 og ligger under kategorien PHP / MySQL. Du kan abonnere på kommentarene ved å bruke RSS 2.0 feed. Du kan legge til kommenter, eller trackback fra din blogg/side.

Resurser

Arkiver

Metainfo


Siste Flickr-bilder

  • Commentsystem (20070308)
  • Ukraina Aksjonen 2006 (20070306)
  • Mikael Brevik blogg (20070306)
  • Mikael Brevik (20070306)
  • Brukerdefinert side - AVIS2 (20070306)
  • Brevik Webutvikling (20070306)
  • skyscraper
  • visittkort