<?php /* Original code based on showtimelist.php writed by Sébastien Dabet (sdabet) */ require_once __DIR__ . '/allocine.class.php'; define('ALLOCINE_PARTNER_KEY', '100043982026'); define('ALLOCINE_SECRET_KEY', '29d185d98c984a359e6e6f26a0474269'); $allocine = new Allocine(ALLOCINE_PARTNER_KEY, ALLOCINE_SECRET_KEY); $zip = "75001"; // Zip code of location to search $radius = "10"; // Radius of area $response = $allocine->showtimelist($zip, $radius); print $response; $json = json_decode($response); // Parse the returned json $theaters = $json->feed->theaterShowtimes; // Retrieve list of theaters $table = array(); // Array of data to display $max_length = array(0, 0, 0, 0, 0); // Array of max column length (to display equal length columns) $index = 0; // Index of current movie // Iterate over all theaters and fill table with movies information foreach ($theaters as $theater) { $times = $theater->movieShowtimes; foreach ($times as $i => $time) { // Append times in an array $horaires = $time->scr; $today = $horaires[0]; $formatted_times = array();