示例#1
0
 function test()
 {
     error_reporting(E_ALL ^ E_STRICT);
     ini_set('display_errors', true);
     $imdb = new IMDb(new IMDbAPI('imdb\\CachedRequest'));
     //var_dump($imdb->movie('tt0347149')->title());
     var_dump($imdb->find('Sucker Punch'));
 }
示例#2
0
<?php

require '../class_IMDb.php';
$imdb = new IMDb(true);
$q = trim(stripslashes($_GET['q']));
$year = $_GET['year'];
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Person by Name - IMDb-PHP-API</title>
</head>
<body>

<p>Enter a search term to return data for matching names. Example: <em>Christian Bale</em></p>
<form action="" method="get">
<input type="text" name="q" value="<?php 
echo $q;
?>
" /> <input type="submit" value="Search" /><br />
<input id="nosummary" type="checkbox" name="nosummary"<?php 
if ($_GET['nosummary'] == "on") {
    print ' checked="checked"';
}
?>
 /> <label for="nosummary">Do NOT summarise?</label><br />
<input type="text" name="limit" value="<?php 
echo intval($_GET['limit']);
?>
" maxlength="2" /> Max. people returned
示例#3
0
<?php

require '../class_IMDb.php';
$imdb = new IMDb(true);
$q = trim(stripslashes($_GET['q']));
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Find by ID - IMDb-PHP-API</title>
</head>
<body>

<p>Enter a movie's IMDb ID to return its data. Example: <em>tt0068646</em></p>
<form action="" method="get">
<input type="text" name="q" maxlength="9" value="<?php 
echo $q;
?>
" /> <input type="submit" value="Find" /><br />
<input id="nosummary" type="checkbox" name="nosummary"<?php 
if ($_GET['nosummary'] == "on") {
    print ' checked="checked"';
}
?>
 /> <label for="nosummary">Do NOT summarise?</label>
</form>
<br />

<?php 
if (!empty($q)) {
示例#4
0
<?php

require '../class_IMDb.php';
$imdb = new IMDb(true);
$chart = trim(stripslashes($_GET['chart']));
$charts = array("top" => "Top 250", "bottom" => "Bottom 100", "boxoffice" => "Box Office (US)");
foreach ($charts as $cid => $cname) {
    if ($chart == $cid) {
        $s = ' selected="selected"';
    }
    $options .= '<option value="' . $cid . '"' . $s . '>' . $cname . '</option>' . "\n";
    unset($s);
}
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Charts - IMDb-PHP-API</title>
</head>
<body>

<p>Various charts from IMDb.</p>
<form action="" method="get">
<select name="chart">
<?php 
echo $options;
?>
</select>
<input type="submit" value="Show" />
</form>
示例#5
0
<?php

require '../class_IMDb.php';
$imdb = new IMDb(true);
$q = trim(stripslashes($_GET['q']));
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Person by ID - IMDb-PHP-API</title>
</head>
<body>

<p>Enter a person's IMDb ID to return their data. Example: <em>nm0000288</em></p>
<form action="" method="get">
<input type="text" name="q" maxlength="9" value="<?php 
echo $q;
?>
" /> <input type="submit" value="Find" /><br />
<input id="nosummary" type="checkbox" name="nosummary"<?php 
if ($_GET['nosummary'] == "on") {
    print ' checked="checked"';
}
?>
 /> <label for="nosummary">Do NOT summarise?</label>
</form>
<br />

<?php 
if (!empty($q)) {
示例#6
0
<?php

require '../class_IMDb.php';
$imdb = new IMDb(true);
$q = trim(stripslashes($_GET['q']));
$year = $_GET['year'];
?>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Find by Title - IMDb-PHP-API</title>
</head>
<body>

<p>Enter a search term to return data for matching movie titles. Example: <em>The Godfather</em></p>
<form action="" method="get">
<input type="text" name="q" value="<?php 
echo $q;
?>
" /> <input type="submit" value="Search" /><br />
<input type="text" name="year" value="<?php 
echo $year;
?>
" maxlength="4" /> Specify year (<em>Optional</em>)<br />
<input id="nosummary" type="checkbox" name="nosummary"<?php 
if ($_GET['nosummary'] == "on") {
    print ' checked="checked"';
}
?>
 /> <label for="nosummary">Do NOT summarise?</label><br />