IMDb-PHP-API
IMDb-PHP-API copied to clipboard
Not working
I used:
require_once("inc/imdbclass.php");
$imdb = new IMDb(false);
$link ="https://www.imdb.com/title/tt1465515/";
$expl = explode("/", $link);
$movie = $imdb->find_by_id(trim($expl[4]));
print_r( $movie);
Error all object Notice: Trying to get property 'data' of non-object in... What is the problem?
The last commit was more than 8 years ago, probably the site changed since then. With this (https://github.com/tboothman/imdbphp) library You will have more success probably (sorry for the shameless plug @chrisjp).
@PoLaKoSz is right. I haven't touched this code in well over 8 years, it's highly likely IMDb have since changed or otherwise disabled the API access my script was using. I have no intention of updating it as there are many alternatives that are probably better than mine and still maintained, let's face it, my code wasn't actually very good anyway.
No problem with the plug, it actually looks like a great alternative, even if it is scraping. They've got a substantial redesign in the works so keep an eye out for when that goes live to everyone, it'll probably completely break your library!