Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of georg fetz  >  IMDB Search  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: IMDB Search
Search for movie titles in the IMDB site
Author: By
Last change:
Date: 2006-08-15 08:01
Size: 540 bytes
 

Contents

Class file image Download
<?php
/*
* Example $q search the internet movie database - imdb.com - for movie titles.
* You receive an array including title and the imdb ID.
*/

//search query
$q 'terminator';

//include the search-class
require_once("classes/class.imdb_search.php");

//init the class
$IMDB_Search = new IMDB_Search;

if (
$IMDB_Search->searchTitles($q))
{
    foreach(
$IMDB_Search->searchTitles($q) as $value)
    {
        print 
'<a href="http://imdb.com/title/'.$value[1].'">'.$value[2].'</a><br />';
    }
}
else
{
    print 
'nothing found';
}

?>