IMDB API
Posted: Wed Jun 27, 2012 7:38 pm
For reasons best known to them. the IMDB do not have their own official API (I don't think) so we have to use ones imdbapi.com. I have just figured out how to get this working, so will probably be implementing this in my site. You will need the name of the film, the year may also help.
Fetch the object from the website and put it into a variable
Hope this hopes and, like I said, I will be implementing this on my site
Fetch the object from the website and put it into a variable
$get_imdb_api = file_get_contents("http://www.imdbapi.com/?t=something");It is JSON, so decode it
$get_imdb_api = json_decode($get_imdb_api);We want to put it in an array because, currently, its an object
$get_imdb_api = get_object_vars($get_imdb_api);If you need the year, add y=theyear
Hope this hopes and, like I said, I will be implementing this on my site