1. Go to this page and download the library: Download zero-to-prod/omdb library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zero-to-prod / omdb example snippets
use Zerotoprod\Omdb\Omdb;
$Omdb = Omdb::from('apiKey');
// Get the poster art of a title by its ImdbID
$Omdb->poster('tt0499549'); // https://img.omdbapi.com/?apikey=8f8423aa&i=tt0499549
// Find a title by ImdbID (Internet Movie DataBase ID) or title
$Omdb->byIdOrTitle('Avatar')->Title; // 2009
// Find multiple titles
$Omdb->search('Avatar')->Search['tt0499549']->Year; // 2009
use Zerotoprod\Omdb\Omdb;
$Omdb = Omdb::from('apiKey');
use Zerotoprod\OmdbApi\OmdbApiInterface;
use Zerotoprod\Omdb\Omdb;
class OmdbApiFake implements OmdbApiInterface
{
public function search()
}
$Omdb = new Omdb(new OmdbApiFake());
$Omdb->search('Avatar');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.