<?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';
}
?>
|