Location: PHPKode > scripts > IMDb Fetch > imdb-fetch/IMDbFetch.php
<?php
/**********************************\
||================================||
||                                ||
||        IMDbFetch v0.1          || 
||        IMDbFetch.php           ||
||              |                 ||
||    - how to use example -      ||
||   by teo rusu                  ||
||   hide@address.com          ||
||   http://- :) not yet, no time ||
||                                ||
||================================||
\\************************/////////
                         /////////
                        /////////  
//
require_once("imdbFetch.class.php");
//
//
$imdbLink = "http://www.imdb.com/title/tt0066434/";
//
$imdbGet = new IMDbFetch($imdbLink);
//
echo '<br>'.$imdbGet->id;
echo '<br>'.$imdbGet->name;
echo '<br>'.$imdbGet->year;
echo '<br>'.$imdbGet->directed_by;
echo '<br>'.$imdbGet->writing_credits;
echo '<br>'.$imdbGet->genre;
echo '<br>'.$imdbGet->rating;
echo '<br>'.$imdbGet->runtime;
echo '<br>'.$imdbGet->comment;
echo '<hr>';
//show the poster image:
$imdbGet->displayPoster();
//  you might want to delete this image
//  after you previw it;
//  so, after you make the insert into
//  the database, just delete the image
//  like so: unlink($imdbGet->poster_image_name);
//
// IMDb poster image:
//
$imdbImage      = $imdbGet->poster_image;
//
$imageData      = $imdbImage[0];
$imageExtension = $imdbImage[1];
//
// THE IMAGE from imdb comes as an array:
//  [0] contains the binary data;
//  [1] contains the image extension;
//
//  ... and it's intended for storing into database.
//
//  for retrieving the image from database, please
//  refer to this link: 
//  http://scudworkz.com/php_tutorials/mysql_image_storing/
//  (it's fairly easy to do it)
//
//
//  and that's it !
//  enjoy!
//
?>
Return current item: IMDb Fetch