First off, please download the unofficial updated version of IMDb Connector and replace it with the old one (the version number is the same).
The API does not find any movie named “Nombre de la película” on IMDb.com. In these cases, it’d be better to use either the English title or – even better – the IMDb ID. If you replace “Nombre de la película” with – for example – “Sin Nombre”, the output will be:
01:36:39
Furthermore, please keep in mind that since IMDb Connector version 1.3.2, most PHP functions that start with get_imdb_connector_*
are not deprecated, that means they have been replaced with functions beginning with imdb_connector_*
for logical reasons. So, instead of using get_imdb_connector_movie("...")
please use imdb_connector_get_movie("...")
Here’s the full optimized code:`
$movie = imdb_connector_get_movie(“Sin Nombre”);
$timestamp = $movie[“runtime”][“timestamp”];
$formatted_time = date(“H:i:s”, $timestamp);
echo “$formatted_time”;`
While you’re at it, I would like to ask you if you have a few minutes to test the new version which extenses the use of shortcodes. You can read more about the new shortcode attributes here, with two example screenshots. If there’s anything not working, please be so kind to report it before I push the official version.
Many thanks!