问:
Display showtime and booking links of the particular movies using International Showtime api
I am using International Showtime api and using that I have displayed list of the movies, images and their titles. On click of the image of the particular movie I want to display their showtimes and the booking links.

Below is the code:

```<code>    <?php
function call_curl($url)
{
    // Get cURL resource
    $ch = curl_init();

    // Set url
    curl_setopt($ch, CURLOPT_URL,$url);

    // Set method
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // Set options
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // Set headers
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "X-API-Key: gZ1oAJY7Tz82K4S6yZ01mcrHyi9fRp53",
     ]
    );

    // Send the request & save response to $resp
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
?>
<html>
    <head>
      <title>Book Show</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <link rel="stylesheet" href="css/slider.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    <body>
    <div class="container" style="border:1px solid">

            <div class="container-fluid">
                <nav class="navbar navbar-inverse">
                    <div class="navbar-header">
                      <a class="navbar-brand" href="#">Book My Show</a>
                    </div>
                    <ul class="nav navbar-nav">
                      <li><a href="#">Movies</a></li>
                      <li><a href="#">Events</a></li>
                      <li><a href="#">Plays</a></li>
                      <li><a href="#">Sports</a></li>
                      <li><a href="#">Trailers & Video</a></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                      <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
                      <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
                    </ul>
                </nav>
                <?php
                $movie_url="https://api.internationalshowtimes.com/v4/movies/";
                $movies=call_curl($movie_url);
                $movies_data = array_reduce(json_decode($movies,true), 'array_merge', array());
                foreach($movies_data as $value)
                {
                    if(!empty($value['poster_image_thumbnail']))
                    {
                    ?>
                    <div class="col-md-2" style="height:300px; width:20%;">

                            <img src="<?php echo $value['poster_image_thumbnail']; ?>" style="height:80%;"/></img>
                        <?php echo $value['title'];?>
                    </div>
                <?php
                    }
                }
                ?>
            </div>
    </body>
</html>
</code>```

答:
You can refer the documentation here, and some suggestions are

Get all showtimes of location and with title, image.. fields:

```<code>    // Set url
$url1 = "https://api.internationalshowtimes.com/v4/showtimes/?location=12.972442,77.580643";

$showtimes = call_curl($url1);//get all showtimes details
$showtimes = json_decode($showtimes);
foreach ($showtimes as $details) {//Now loop through all showtime
    foreach ($details as $detail) {//get full details of each movie
        $movie['start_at'] = $detail->start_at;
        $movie['booking_type'] = $detail->booking_type;
        $movie['auditorium'] = $detail->auditorium;//add other field similarly
        $movie_id = $detail->movie_id;
        $url2 = "https://api.internationalshowtimes.com/v4/movies/$movie_id/?location=12.972442,77.580643&movie_fields=id,title,slug,poster_image_thumbnail";
        $movie[] = call_curl($url2);
    }
}

echo "```";
print_r($movie);//this will have all the movie details with title, image, genre details
echo "```";

function call_curl($url)
{
    // Get cURL resource
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);

    // Set method
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // Set options
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // Set headers
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "X-API-Key: gZ1oAJY7Tz82K4S6yZ01mcrHyi9fRp53",
     ]
    );
    // Send the request & save response to $resp
    $data = curl_exec($ch);
    // Close request to clear up some resources
    curl_close($ch);
    /*if(!$resp) {
      die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
    } else {
      //echo "Response HTTP Status Code : " . curl_getinfo($ch, CURLINFO_HTTP_CODE);

      //echo "\nResponse HTTP Body : " . $resp;
      echo "```";
      $arr=json_decode($resp,true);
      print_r($arr);
      echo "```";
    }*/
    return $data;

}
</code>```

OUTPUT:
Below is for one movie:

```Array
(
    [start_at] => 2017-06-08T22:00:00+05:30
    [booking_type] => external
    [auditorium] => SCREEN 6
    [0] => {"movie":{"id":"20606","slug":"baywatch","title":"Baywatch","poster_image_thumbnail":"http://image.tmdb.org/t/p/w154/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","original_title":"Baywatch","original_language":"en","synopsis":"Devoted lifeguard Mitch Buchannon butts heads with a brash new recruit. Together, they uncover a local criminal plot that threatens the future of the Bay.","runtime":116,"genres":[{"id":"0","name":"Action"},{"id":"3","name":"Comedy"}],"poster_image":{"image_files":[{"url":"http://image.tmdb.org/t/p/w92/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":92,"height":138}},{"url":"http://image.tmdb.org/t/p/w154/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":154,"height":231}},{"url":"http://image.tmdb.org/t/p/w185/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":185,"height":278}},{"url":"http://image.tmdb.org/t/p/w342/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":342,"height":513}},{"url":"http://image.tmdb.org/t/p/w500/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":500,"height":750}},{"url":"http://image.tmdb.org/t/p/w780/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":780,"height":1170}},{"url":"http://image.tmdb.org/t/p/original/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":2000,"height":3000}}]},"scene_images":[{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1920,"height":1080}}]}],"trailers":[{"language":"en","is_official":true,"trailer_files":[{"format":"youtube","transfert":"1920x1080","url":"https://www.youtube.com/watch?v=gUFgJ8f9slo"}]},{"language":"en","is_official":true,"trailer_files":[{"format":"youtube","transfert":"1920x1080","url":"https://www.youtube.com/watch?v=eyKOgnaf0BU"}]}],"ratings":{"imdb":{"value":"6.1","vote_count":648},"tmdb":{"value":5.6,"vote_count":223}},"age_limits":{"DK":"t.o.11","US":"R","BR":"14","DE":12,"GB":"15","RU":"18+","IE":"15A"},"release_dates":{"RU":[{"locale":"ru-RU","region":null,"date":"2017-06-01"}],"DK":[{"locale":"da-DK","region":null,"date":"2017-06-01"}],"CH":[{"locale":"de-CH","region":null,"date":"2017-06-21"}],"US":[{"locale":"en-US","region":null,"date":"2017-05-26"},{"locale":"en-US","region":null,"date":"2017-05-25"}],"BR":[{"locale":"pt-BR","region":null,"date":"2017-06-15"}],"DE":[{"locale":"de-DE","region":null,"date":"2017-06-01"}],"AU":[{"locale":"en-AU","region":null,"date":"2017-06-01"}],"ES":[{"locale":"es-ES","region":null,"date":"2017-06-16"}],"FR":[{"locale":"fr-FR","region":null,"date":"2017-06-21"}],"GB":[{"locale":"en-GB","region":null,"date":"2017-05-29"}],"UA":[{"locale":"uk-UA","region":null,"date":"2017-06-01"}],"IE":[{"locale":"en-IE","region":null,"date":"2017-05-26"}]},"website":"http://www.thebaywatchmovie.com/","production_companies":null,"keywords":null,"imdb_id":"tt1469304","tmdb_id":"339846","rentrak_film_id":125754,"cast":[{"id":"4c934fa80bc4f9271604ca2a577f8ea3","character":"Mitch Buchanan","name":"Dwayne Johnson"},{"id":"ca7e4bad804a48b19a21a461be45abf5","character":"Matt Brody","name":"Zac Efron"},{"id":"b21140d7b14026ff9dd33a5c7e5a3da9","character":"Summer Quinn","name":"Alexandra Daddario"},{"id":"c9f6457dba059e03dea3fed6e32a56ed","character":"C.J. Parker","name":"Kelly Rohrbach"},{"id":"51ae3a92ba49c90bd9b0d48565cba5ee","character":"Victoria Leeds","name":"Priyanka Chopra"},{"id":"0d56f6e48a07824e584ec9de88edae98","character":"Stephanie Holden","name":"Ilfenesh Hadera"},{"id":"64ae6f0d63b0d7cf335f0f52c7c63550","character":"Captain Thorpe","name":"Rob Huebel"},{"id":"396caf2714bec6f965e918d25042e47d","character":"Sgt. Ellerbee","name":"Yahya Abdul-Mateen II"},{"id":"2fb7f0d815969e2e47b8b7d56d3c32c2","character":"Sergeant","name":"John Cenatiempo"},{"id":"49a175399400e222a50fb71471353241","character":"Casey Jean Parker","name":"Pamela Anderson"},{"id":"4eeb78578c73316988110501033f4cfa","character":"Dave the Tech","name":"Hannibal Buress"},{"id":"9fa2f63cff1c166b5b6b57132df1cfa7","character":"Julia","name":"Charlotte McKinney"},{"id":"b7df2fbee8cfad8aee12a8b3375c57c5","character":"Leon","name":"Jack Kesy"},{"id":"33cc7c1b2370463e33997808bb54d8dc","character":"The Mentor","name":"David Hasselhoff"},{"id":"d2a78894055b5a6cfc0f1bb7404262ec","character":"Amber","name":"Izabel Goulart"},{"id":"7054a42ca2fdc4f517dba12e28eab727","character":"Lifeguard","name":"Ana Flavia Gavlak"},{"id":"678c0c1b42b2808cc0a20e905aa0a757","character":"Surfer beach babe","name":"Angelique Kenney"},{"id":"4dcf259368c1f7b069dc2fb890b9ac20","character":"Councilman Rodriguez","name":"Oscar Nunez"},{"id":"28885993f0410cd29ee23cb388b81b23","character":"Ronnie","name":"Jon Bass"},{"id":"7757f858514e3b3f51f32467b70cd977","character":"Skateboarder #1","name":"Brandon Larracuente"},{"id":"bd06c05c98e1d21fe4afda9a4fd0fec1","character":"Bikini Model","name":"Maegan Vogel"},{"id":"738804afd66afd7bdd45b132ce6dbf7a","character":"Allegre","name":"Haviland Stillwell"},{"id":"bd8637f92be6bbc2f7212992b5367c0f","character":"VIP Party Member","name":"Kera Lynn"},{"id":"afaf1a923bc684128940535419571cec","character":"Doctor","name":"Whitney Goin"},{"id":"b26e35f8deb40c70cf879d1720ead920","character":"Frankie","name":"Amin Joseph"},{"id":"d3bae70c9d49bb7cb5a74cdd0eae7fc4","character":"Carmen","name":"Belinda"},{"id":"9a0bf9f19fbe7898e890c9100d52dfd5","character":"Lifeguard","name":"Lee Hodge"},{"id":"caf8e99f1f46061a73f3f6d2844aa59f","character":"The Kitchen Worker","name":"Earl Poitier"},{"id":"6bdf237d8f996a655a1e352e291b63a6","character":"Bikini Girl","name":"Shay Davila"},{"id":"ffd570715ed1561b754a9be1bb6ee75a","character":"Yachter","name":"Barbara Vincent"},{"id":"45b76362dd0830cbdf8006150d1bd5bf","character":"Lifeguard #1","name":"Damon Preston"},{"id":"86c89a9cc077b8f454ae006b9531a5ae","character":"Beach Goer","name":"Bria Danielle Davis"},{"id":"df0897f9c3570ca5d5d5c520fe559889","character":"Crewman","name":"Cody Scott"},{"id":"456821c3be5b6d7c8d60ece7b06ff61d","character":"Interviewer","name":"Samantha Harris"},{"id":"0a6e346c3fb9815eb1cb7ea303d07aff","character":"Helicopter Pilot","name":"Seth Gordon"},{"id":"758a5b57b56190f64cc434ccb4006a3d","character":"Surfer","name":"Brenda Lowe"},{"id":"40fdce1f64149bf45136ff28025918ad","character":"Huntley Waiter","name":"Pedro Anaya Pérez"},{"id":"58e4f953d2f1253af229313f330e37e1","character":"Pete","name":"Vincenzo Hinckley"},{"id":"aef9ae6d8fc8bf641f10727f4e8bcede","character":"Arian Foster","name":"Arian Foster"},{"id":"306c9a4caca2df0653d80dc56d7c69cf","character":"Pier Mom","name":"Karin Silvestri"},{"id":"5c0d68c7cda1cde707eeb4949d45947a","character":"Baywatch Baby (uncredited)","name":"Tamila Bilalova"},{"id":"3f88083eb7ac451e46aecbbaf7c3ea05","character":"Beach Goer (uncredited)","name":"Casey McCullum"},{"id":"aa467165f29adff4cb79b97339f5ad6b","character":"Lifeguard (uncredited)","name":"Zachary Vazquez"}],"crew":[{"id":"0a6e346c3fb9815eb1cb7ea303d07aff","name":"Seth Gordon","job":"director"}]}}
)
```

Body:
I am using International Showtime api and using that I have displayed list of the movies, images and their titles. On click of the image of the particular movie I want to display their showtimes and the booking links.

Below is the code:

    <?php
function call_curl($url)
{
    // Get cURL resource
    $ch = curl_init();

    // Set url
    curl_setopt($ch, CURLOPT_URL,$url);

    // Set method
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // Set options
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // Set headers
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "X-API-Key: gZ1oAJY7Tz82K4S6yZ01mcrHyi9fRp53",
     ]
    );

    // Send the request & save response to $resp
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
?>

      <title>Book Show</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <link rel="stylesheet" href="css/slider.css">

                      Book My Show

Movies

Events

Plays

Sports

Trailers & Video

 Sign Up

 Login

                <?php
                $movie_url="https://api.internationalshowtimes.com/v4/movies/";
                $movies=call_curl($movie_url);
                $movies_data = array_reduce(json_decode($movies,true), 'array_merge', array());
                foreach($movies_data as $value)
                {
                    if(!empty($value['poster_image_thumbnail']))
                    {
                    ?>

                            <img src="<?php echo $value['poster_image_thumbnail']; ?>" style="height:80%;"/>
                        <?php echo $value['title'];?>

                <?php
                    }
                }
                ?>

Body:
You can refer the documentation here, and some suggestions are

Get all showtimes of location and with title, image.. fields:

    // Set url
$url1 = "https://api.internationalshowtimes.com/v4/showtimes/?location=12.972442,77.580643";

$showtimes = call_curl($url1);//get all showtimes details
$showtimes = json_decode($showtimes);
foreach ($showtimes as $details) {//Now loop through all showtime
    foreach ($details as $detail) {//get full details of each movie
        $movie['start_at'] = $detail->start_at;
        $movie['booking_type'] = $detail->booking_type;
        $movie['auditorium'] = $detail->auditorium;//add other field similarly
        $movie_id = $detail->movie_id;
        $url2 = "https://api.internationalshowtimes.com/v4/movies/$movie_id/?location=12.972442,77.580643&movie_fields=id,title,slug,poster_image_thumbnail";
        $movie[] = call_curl($url2);
    }
}

echo "<pre>";
print_r($movie);//this will have all the movie details with title, image, genre details
echo "</pre>";

function call_curl($url)
{
    // Get cURL resource
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);

    // Set method
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // Set options
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    // Set headers
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "X-API-Key: gZ1oAJY7Tz82K4S6yZ01mcrHyi9fRp53",
     ]
    );
    // Send the request & save response to $resp
    $data = curl_exec($ch);
    // Close request to clear up some resources
    curl_close($ch);
    /*if(!$resp) {
      die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
    } else {
      //echo "Response HTTP Status Code : " . curl_getinfo($ch, CURLINFO_HTTP_CODE);

      //echo "\nResponse HTTP Body : " . $resp;
      echo "<pre>";
      $arr=json_decode($resp,true);
      print_r($arr);
      echo "</pre>";
    }*/
    return $data;

}

OUTPUT:
Below is for one movie:

Array
(
    [start_at] => 2017-06-08T22:00:00+05:30
    [booking_type] => external
    [auditorium] => SCREEN 6
    [0] => {"movie":{"id":"20606","slug":"baywatch","title":"Baywatch","poster_image_thumbnail":"http://image.tmdb.org/t/p/w154/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","original_title":"Baywatch","original_language":"en","synopsis":"Devoted lifeguard Mitch Buchannon butts heads with a brash new recruit. Together, they uncover a local criminal plot that threatens the future of the Bay.","runtime":116,"genres":[{"id":"0","name":"Action"},{"id":"3","name":"Comedy"}],"poster_image":{"image_files":[{"url":"http://image.tmdb.org/t/p/w92/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":92,"height":138}},{"url":"http://image.tmdb.org/t/p/w154/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":154,"height":231}},{"url":"http://image.tmdb.org/t/p/w185/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":185,"height":278}},{"url":"http://image.tmdb.org/t/p/w342/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":342,"height":513}},{"url":"http://image.tmdb.org/t/p/w500/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":500,"height":750}},{"url":"http://image.tmdb.org/t/p/w780/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":780,"height":1170}},{"url":"http://image.tmdb.org/t/p/original/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","size":{"width":2000,"height":3000}}]},"scene_images":[{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/tryI7qZHaLMVzMNpLyKHKDiZOLc.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/t6TL7V9IsT4Ktx6YO8b1UYj3agd.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/603wLumdVVXjKLNhf6vP1jXsd3e.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/t1cq0DBDyIPeQkso23YsOy6q9iU.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/eJ7uvfB0HTnipuB6pUuEFvtrjp6.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/txDmpGYl4RmZBOAzyfJcibKrTdI.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/rhya0ioZ4ovtAmFC9FNo5UuEg4k.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/q6ijCw7A1rXMhm2uzNTB8a6OTDh.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/vZqBnSUwmSwyLHLYYhgtEkS6qAR.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/5KJp2ZJ1AxP7EmVoKuN2xev8H9R.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/ar5FTwRq9zTgn8HWekIGeToT2cr.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/mOGmp3NgJ4yKJ0RgIB0GffitEM7.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/zbNnL182Xrnu7CpKpyzwUgbdSZo.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/cUHWtD8gxqaz0u23cdoz0TM159O.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/lAE4D3KowfR8nTfHSeLuEYHWjmF.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/bU78AWJk7LcpKSMUhLV224d4jtk.jpg","size":{"width":1920,"height":1080}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/vSY748KlJffgIq4nrzklopU4PEK.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/xICo1Hoa9XItooriqGfIn6bwXRH.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/tGfAIG1ZMBDExoYkhMRQzPy20oS.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/nYO8VdBNUhx6TPEcl5pbmly64NY.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/8ABFP19p5ebnj9wtx1Vx3Hy9xpz.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/jAQow2bvuRt2HPjkuaiTSsHAkfS.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/kNvdCvBjKRnYm0rM5yMgOg3JhNr.jpg","size":{"width":3840,"height":2160}}]},{"image_files":[{"url":"http://image.tmdb.org/t/p/w300/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":300,"height":169}},{"url":"http://image.tmdb.org/t/p/w780/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":780,"height":439}},{"url":"http://image.tmdb.org/t/p/w1000/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1000,"height":563}},{"url":"http://image.tmdb.org/t/p/w1280/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1280,"height":720}},{"url":"http://image.tmdb.org/t/p/w1920/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1920,"height":1080}},{"url":"http://image.tmdb.org/t/p/original/v9TdQleXaveabiuOw9cyUOIUfeb.jpg","size":{"width":1920,"height":1080}}]}],"trailers":[{"language":"en","is_official":true,"trailer_files":[{"format":"youtube","transfert":"1920x1080","url":"https://www.youtube.com/watch?v=gUFgJ8f9slo"}]},{"language":"en","is_official":true,"trailer_files":[{"format":"youtube","transfert":"1920x1080","url":"https://www.youtube.com/watch?v=eyKOgnaf0BU"}]}],"ratings":{"imdb":{"value":"6.1","vote_count":648},"tmdb":{"value":5.6,"vote_count":223}},"age_limits":{"DK":"t.o.11","US":"R","BR":"14","DE":12,"GB":"15","RU":"18+","IE":"15A"},"release_dates":{"RU":[{"locale":"ru-RU","region":null,"date":"2017-06-01"}],"DK":[{"locale":"da-DK","region":null,"date":"2017-06-01"}],"CH":[{"locale":"de-CH","region":null,"date":"2017-06-21"}],"US":[{"locale":"en-US","region":null,"date":"2017-05-26"},{"locale":"en-US","region":null,"date":"2017-05-25"}],"BR":[{"locale":"pt-BR","region":null,"date":"2017-06-15"}],"DE":[{"locale":"de-DE","region":null,"date":"2017-06-01"}],"AU":[{"locale":"en-AU","region":null,"date":"2017-06-01"}],"ES":[{"locale":"es-ES","region":null,"date":"2017-06-16"}],"FR":[{"locale":"fr-FR","region":null,"date":"2017-06-21"}],"GB":[{"locale":"en-GB","region":null,"date":"2017-05-29"}],"UA":[{"locale":"uk-UA","region":null,"date":"2017-06-01"}],"IE":[{"locale":"en-IE","region":null,"date":"2017-05-26"}]},"website":"http://www.thebaywatchmovie.com/","production_companies":null,"keywords":null,"imdb_id":"tt1469304","tmdb_id":"339846","rentrak_film_id":125754,"cast":[{"id":"4c934fa80bc4f9271604ca2a577f8ea3","character":"Mitch Buchanan","name":"Dwayne Johnson"},{"id":"ca7e4bad804a48b19a21a461be45abf5","character":"Matt Brody","name":"Zac Efron"},{"id":"b21140d7b14026ff9dd33a5c7e5a3da9","character":"Summer Quinn","name":"Alexandra Daddario"},{"id":"c9f6457dba059e03dea3fed6e32a56ed","character":"C.J. Parker","name":"Kelly Rohrbach"},{"id":"51ae3a92ba49c90bd9b0d48565cba5ee","character":"Victoria Leeds","name":"Priyanka Chopra"},{"id":"0d56f6e48a07824e584ec9de88edae98","character":"Stephanie Holden","name":"Ilfenesh Hadera"},{"id":"64ae6f0d63b0d7cf335f0f52c7c63550","character":"Captain Thorpe","name":"Rob Huebel"},{"id":"396caf2714bec6f965e918d25042e47d","character":"Sgt. Ellerbee","name":"Yahya Abdul-Mateen II"},{"id":"2fb7f0d815969e2e47b8b7d56d3c32c2","character":"Sergeant","name":"John Cenatiempo"},{"id":"49a175399400e222a50fb71471353241","character":"Casey Jean Parker","name":"Pamela Anderson"},{"id":"4eeb78578c73316988110501033f4cfa","character":"Dave the Tech","name":"Hannibal Buress"},{"id":"9fa2f63cff1c166b5b6b57132df1cfa7","character":"Julia","name":"Charlotte McKinney"},{"id":"b7df2fbee8cfad8aee12a8b3375c57c5","character":"Leon","name":"Jack Kesy"},{"id":"33cc7c1b2370463e33997808bb54d8dc","character":"The Mentor","name":"David Hasselhoff"},{"id":"d2a78894055b5a6cfc0f1bb7404262ec","character":"Amber","name":"Izabel Goulart"},{"id":"7054a42ca2fdc4f517dba12e28eab727","character":"Lifeguard","name":"Ana Flavia Gavlak"},{"id":"678c0c1b42b2808cc0a20e905aa0a757","character":"Surfer beach babe","name":"Angelique Kenney"},{"id":"4dcf259368c1f7b069dc2fb890b9ac20","character":"Councilman Rodriguez","name":"Oscar Nunez"},{"id":"28885993f0410cd29ee23cb388b81b23","character":"Ronnie","name":"Jon Bass"},{"id":"7757f858514e3b3f51f32467b70cd977","character":"Skateboarder #1","name":"Brandon Larracuente"},{"id":"bd06c05c98e1d21fe4afda9a4fd0fec1","character":"Bikini Model","name":"Maegan Vogel"},{"id":"738804afd66afd7bdd45b132ce6dbf7a","character":"Allegre","name":"Haviland Stillwell"},{"id":"bd8637f92be6bbc2f7212992b5367c0f","character":"VIP Party Member","name":"Kera Lynn"},{"id":"afaf1a923bc684128940535419571cec","character":"Doctor","name":"Whitney Goin"},{"id":"b26e35f8deb40c70cf879d1720ead920","character":"Frankie","name":"Amin Joseph"},{"id":"d3bae70c9d49bb7cb5a74cdd0eae7fc4","character":"Carmen","name":"Belinda"},{"id":"9a0bf9f19fbe7898e890c9100d52dfd5","character":"Lifeguard","name":"Lee Hodge"},{"id":"caf8e99f1f46061a73f3f6d2844aa59f","character":"The Kitchen Worker","name":"Earl Poitier"},{"id":"6bdf237d8f996a655a1e352e291b63a6","character":"Bikini Girl","name":"Shay Davila"},{"id":"ffd570715ed1561b754a9be1bb6ee75a","character":"Yachter","name":"Barbara Vincent"},{"id":"45b76362dd0830cbdf8006150d1bd5bf","character":"Lifeguard #1","name":"Damon Preston"},{"id":"86c89a9cc077b8f454ae006b9531a5ae","character":"Beach Goer","name":"Bria Danielle Davis"},{"id":"df0897f9c3570ca5d5d5c520fe559889","character":"Crewman","name":"Cody Scott"},{"id":"456821c3be5b6d7c8d60ece7b06ff61d","character":"Interviewer","name":"Samantha Harris"},{"id":"0a6e346c3fb9815eb1cb7ea303d07aff","character":"Helicopter Pilot","name":"Seth Gordon"},{"id":"758a5b57b56190f64cc434ccb4006a3d","character":"Surfer","name":"Brenda Lowe"},{"id":"40fdce1f64149bf45136ff28025918ad","character":"Huntley Waiter","name":"Pedro Anaya Pérez"},{"id":"58e4f953d2f1253af229313f330e37e1","character":"Pete","name":"Vincenzo Hinckley"},{"id":"aef9ae6d8fc8bf641f10727f4e8bcede","character":"Arian Foster","name":"Arian Foster"},{"id":"306c9a4caca2df0653d80dc56d7c69cf","character":"Pier Mom","name":"Karin Silvestri"},{"id":"5c0d68c7cda1cde707eeb4949d45947a","character":"Baywatch Baby (uncredited)","name":"Tamila Bilalova"},{"id":"3f88083eb7ac451e46aecbbaf7c3ea05","character":"Beach Goer (uncredited)","name":"Casey McCullum"},{"id":"aa467165f29adff4cb79b97339f5ad6b","character":"Lifeguard (uncredited)","name":"Zachary Vazquez"}],"crew":[{"id":"0a6e346c3fb9815eb1cb7ea303d07aff","name":"Seth Gordon","job":"director"}]}}
)


来源: stackexchange

问:
Best practice for using date parameters in Spring controllers?
After written several backend APIs, I found that the following code duplicates in almost every method which needs to filter data by dates:

@GetMapping(value="/api/test")
@ResponseBody
public Result test(@RequestParam(value = "since", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate since,
                   @RequestParam(value = "until", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate until) {
    // Date validation code I want to eliminate
    since = ObjectUtils.defaultIfNull(since, DEFAULT_SINCE_DATE);
    until = ObjectUtils.defaultIfNull(until, LocalDate.now().plusDays(1));
    if(since.isAfter(until)) {
        throw new SinceDateAfterUntilDateException();
    }

    // Do stuff
}
```

Obviously this is some kind of code smell. But, since I do need to validate since and until before using them to query the service/DAO, I am not sure where should I extract these code to?

Any advice?

答:
If you have request params received from object then you can do it by using Bean level Validation(JSR 303) and custom Date Deserializer by extending  Jackson serializers. This way you dont have check the params for null.</p>

```<code>public class yourBeanName{
 public LocalDate since;
 public LocalDate until;

  @JsonDeserialize(using = CustomDateDeserializer.class)
   public void setSince(LocalDate since) {
    this.since = since;
   }

    // same for until
}

 // Custom jackson Desealizer

  @Component
  public class CustomDateDeserializer extends StdDeserializer<Date> {
    @Override
    public Date deserialize(JsonParser jsonparser, DeserializationContext
  context)
    throws IOException, JsonProcessingException {
    // Here check the date for null and assign default with your dateTimeFormat
    }

 }
</code>```

ContentLicense: CC BY-SA 3.0

Body:
After written several backend APIs, I found that the following code duplicates in almost every method which needs to filter data by dates:

@GetMapping(value="/api/test")
@ResponseBody
public Result test(@RequestParam(value = "since", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate since,
                   @RequestParam(value = "until", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate until) {
    // Date validation code I want to eliminate
    since = ObjectUtils.defaultIfNull(since, DEFAULT_SINCE_DATE);
    until = ObjectUtils.defaultIfNull(until, LocalDate.now().plusDays(1));
    if(since.isAfter(until)) {
        throw new SinceDateAfterUntilDateException();
    }

    // Do stuff
}

Obviously this is some kind of code smell. But, since I do need to validate since and until before using them to query the service/DAO, I am not sure where should I extract these code to?

Any advice?

Body:
If you have request params received from object then you can do it by using Bean level Validation(JSR 303) and custom Date Deserializer by extending  Jackson serializers. This way you dont have check the params for null.

public class yourBeanName{
 public LocalDate since;
 public LocalDate until;

  @JsonDeserialize(using = CustomDateDeserializer.class)
   public void setSince(LocalDate since) {
    this.since = since;
   }

    // same for until
}

 // Custom jackson Desealizer

  @Component
  public class CustomDateDeserializer extends StdDeserializer<Date> {
    @Override
    public Date deserialize(JsonParser jsonparser, DeserializationContext
  context)
    throws IOException, JsonProcessingException {
    // Here check the date for null and assign default with your dateTimeFormat
    }

 }


问:
How do I convert a JSON string to a function in javascript?
How can I convert a string in javascript/jquery to a function?

I am trying to use a JSON parameter list to initialize a function.  However, one of the parameters is a function, which I store as a string, and I get an error when I try to use eval() to return the function.

For example, if my JSON is:

```<code>json = { "one": 700, "two": "function(e){alert(e);}" }
</code>```

Then in my code:

```<code>parameters = eval(json);
$('myDiv').addThisFeature({
 parameter_1: json.one,
 parameter_2: eval(json.two)  // <= generates error
})
</code>```

答: See this SO question. As was said, JSON is meant to hold data.  To treat a piece of the data as a function, you would first need to eval the string.</p>

ContentLicense: CC BY-SA 2.5

Body:
How can I convert a string in javascript/jquery to a function?

I am trying to use a JSON parameter list to initialize a function.  However, one of the parameters is a function, which I store as a string, and I get an error when I try to use eval() to return the function.

For example, if my JSON is:

json = { "one": 700, "two": "function(e){alert(e);}" }

Then in my code:

parameters = eval(json);
$('myDiv').addThisFeature({
 parameter_1: json.one,
 parameter_2: eval(json.two)  // <= generates error
})


问:
(AngularJS) Most efficient way to replace values in array globally
I want to replace all values in my array, here's the code:

```<code>var jsonImg = [
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 01.jpg"},
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 02.jpg"},
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 03.jpg"}
];

var imgUrl = JSON.stringify(jsonImg);
var oldString = imgUrl;
var newString = oldString.replace(/https:\/\/example.amazonaws.com\/images-lib\//g,"cordova.url/");

$scope.Images = JSON.parse(newString);
</code>```

But I think JSON.Stringfly and JSON.Parse are a bit redundant here, Do you think this is the most efficient way to replace all of the value JSON.Stringfly and JSON.Parse? are there some other alternative to do this? Please check the fiddle here:
https://jsfiddle.net/dedenbangkit/zu7utr6a/3/

答:
In my understanding, repeating cdn path in all image urls is redundant. You should create another variable that will hold this path and when you need to use it, just concat both strings. This way, you can easily change cdn path and you do not need to process.

Sample

For demonstration purpose, I have used Math.random, but you can put your condition.

function ImgCtrl($scope) {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  var urls = [{
    "url": "1496846856-Retina 01.jpg"
  }, {
    "url": "1496846856-Retina 02.jpg"
  }, {
    "url": "1496846856-Retina 03.jpg"
  }]

  $scope.path = Math.floor(Math.random() * 100) % 2 === 0 ? s3 : cordava;
  $scope.Images = urls;
  console.log($scope.Images[0].url)
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<div ng-app>
  <div ng-controller="ImgCtrl">
    <ul>
      <li ng-repeat="Image in Images">
        {{path}}{{Image.url}}
      </li>
    </ul>
  </div>
</div></code>```

As per our discussion, you can have 2 options:

Sample 1 is more useful when your flag is more dynamic and will change very frequently.

Sample 2 is more useful in cases your flag will only have 1 value for 1 cycle. Something like A/B testing. Since it will remain same always for a cycle, computing again makes no sense. Just save a processed value. This will also encapsulate urls in scope and it will not be available outside, so adds security.

// Sample 1
var flag = Math.floor(Math.random() * 100) % 2 === 0;

function getImagePath(image) {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  return (flag ? s3 : cordava) + image;
}

// Usage:

var url = getImagePath(imageUrl)

// Sample 2
var path = (function() {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  return flag ? s3 : cordava;
})()

var url = path + imageUrl;
```

Body:
I want to replace all values in my array, here's the code:

var jsonImg = [
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 01.jpg"},
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 02.jpg"},
{"url":"https://example.amazonaws.com/images-lib/1496846856-Retina 03.jpg"}
];

var imgUrl = JSON.stringify(jsonImg);
var oldString = imgUrl;
var newString = oldString.replace(/https:\/\/example.amazonaws.com\/images-lib\//g,"cordova.url/");

$scope.Images = JSON.parse(newString);

But I think JSON.Stringfly and JSON.Parse are a bit redundant here, Do you think this is the most efficient way to replace all of the value JSON.Stringfly and JSON.Parse? are there some other alternative to do this? Please check the fiddle here:
https://jsfiddle.net/dedenbangkit/zu7utr6a/3/

Body:
In my understanding, repeating cdn path in all image urls is redundant. You should create another variable that will hold this path and when you need to use it, just concat both strings. This way, you can easily change cdn path and you do not need to process.

Sample

For demonstration purpose, I have used Math.random, but you can put your condition.

function ImgCtrl($scope) {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  var urls = [{
    "url": "1496846856-Retina 01.jpg"
  }, {
    "url": "1496846856-Retina 02.jpg"
  }, {
    "url": "1496846856-Retina 03.jpg"
  }]

  $scope.path = Math.floor(Math.random() * 100) % 2 === 0 ? s3 : cordava;
  $scope.Images = urls;
  console.log($scope.Images[0].url)
}

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<div ng-app>
  <div ng-controller="ImgCtrl">
    <ul>
      <li ng-repeat="Image in Images">
        {{path}}{{Image.url}}
      </li>
    </ul>
  </div>
</div>

As per our discussion, you can have 2 options:

Sample 1 is more useful when your flag is more dynamic and will change very frequently.

Sample 2 is more useful in cases your flag will only have 1 value for 1 cycle. Something like A/B testing. Since it will remain same always for a cycle, computing again makes no sense. Just save a processed value. This will also encapsulate urls in scope and it will not be available outside, so adds security.

// Sample 1
var flag = Math.floor(Math.random() * 100) % 2 === 0;

function getImagePath(image) {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  return (flag ? s3 : cordava) + image;
}

// Usage:

var url = getImagePath(imageUrl)

// Sample 2
var path = (function() {
  var s3 = "https://s3-ap-southeast-1.amazonaws.com/publixx-statics/images-lib/";
  var cordava = "cordova.url/";
  return flag ? s3 : cordava;
})()

var url = path + imageUrl;


问:
ANDROID:- not able to get the available wifi list using ScanResult
I'm trying to list available wifi network by ScanResult.

Can anyone tell me what's wrong in my code? I'm not getting the desired output.

Here's My code:

```<code>public class Activity_scanwifi extends AppCompatActivity {

    Switch aSwitch;
    TextView textView;
    WifiManager wifiManager;
    WifiInfo wifiInfo;
    String info;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.scanwifi);

        aSwitch=(Switch) findViewById(R.id.s);
        textView=(TextView) findViewById(R.id.textView);
        wifiManager=(WifiManager) getSystemService(Context.WIFI_SERVICE);
        wifiManager.startScan();

        aSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                // switch on
                if(isChecked && ! wifiManager.isWifiEnabled())
                {
                    wifiManager.setWifiEnabled(true);
                    wifiInfo=wifiManager.getConnectionInfo();
                }
                // switch off
                if (!isChecked && wifiManager.isWifiEnabled())
                {
                  wifiManager.setWifiEnabled(false);
                }
            }
        });
        broadcast b=new broadcast();
        registerReceiver(b,new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
    }

    public class broadcast extends BroadcastReceiver{
        @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
        @Override
        public void onReceive(Context context, Intent intent) {
            // onReceive method updates any change in the available wifi
            StringBuffer stringBuffer=new StringBuffer();
           /// List<WifiConfiguration> list=wifiManager.getConfiguredNetworks();
            List<ScanResult> list=wifiManager.getScanResults();
            //for(WifiConfiguration wifiConfiguration : list)
            for(ScanResult scanResult : list)
            {
                stringBuffer.append(scanResult);
            }

            textView.setText(stringBuffer);

        }
    }
}
</code>```

答:
Try this code:

Manifest Permission:

android:name="android.permission.ACCESS_WIFI_STATE"
  android:name="android.permission.CHANGE_WIFI_STATE"

Activity

```<code>public class MainActivity extends Activity implements OnClickListener {

    Button setWifi;
    ListView listViwProvider;

    WifiManager wifiManager;
    WifiReceiver receiverWifi;
    List<ScanResult> wifiList;
    List<String> listOfProvider;
    ListAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        listOfProvider = new ArrayList<String>();
        listViwProvider = (ListView) findViewById(R.id.list_view_wifi);
        setWifi = (Button) findViewById(R.id.btn_wifi);

        setWifi.setOnClickListener(this);
        wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);

        if (wifiManager.isWifiEnabled() == true) {
            setWifi.setText("ON");
            scaning();
        }else {
            wifiManager.setWifiEnabled(true);
            setWifi.setText("ON");
            scaning();
        }

        listViwProvider.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                    ImportDialog action = new ImportDialog(MainActivity.this, (wifiList.get(position)).toString());
                    action.showDialog();
            }
        });
    }

    private void scaning() {
        receiverWifi = new WifiReceiver();
        registerReceiver(receiverWifi, new IntentFilter(
                WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
        wifiManager.startScan();

    }

    @Override
    public void onClick(View arg0) {
        if (wifiManager.isWifiEnabled() == true) {
            wifiManager.setWifiEnabled(false);
            setWifi.setText("OFF");
            listViwProvider.setVisibility(ListView.GONE);
        }
        else if (wifiManager.isWifiEnabled() == false) {
            wifiManager.setWifiEnabled(true);
            setWifi.setText("ON");
            listViwProvider.setVisibility(ListView.VISIBLE);
            scaning();
        }
    }

    protected void onPause() {
        super.onPause();
        unregisterReceiver(receiverWifi);
    }

    protected void onResume() {
        registerReceiver(receiverWifi, new IntentFilter(
                WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
        super.onResume();
    }

    class WifiReceiver extends BroadcastReceiver {

        public void onReceive(Context c, Intent intent) {
            wifiList = wifiManager.getScanResults();
            Collections.sort(wifiList, new Comparator<ScanResult>() {
                @Override
                public int compare(ScanResult lhs, ScanResult rhs) {
                    return (lhs.level > rhs.level ? -1
                            : (lhs.level == rhs.level ? 0 : 1));
                }
            });
            listOfProvider.clear();
            String providerName;
            for (int i = 0; i < wifiList.size(); i++) {
                providerName = (wifiList.get(i).SSID).toString()
                        +"\n"+(wifiList.get(i).BSSID).toString();
                listOfProvider.add(providerName);
            }
            adapter = new ListAdapter(MainActivity.this, listOfProvider);
            listViwProvider.setAdapter(adapter);
            adapter.notifyDataSetChanged();
        }
    }
}
</code>```

Adapter

```<code>public class ListAdapter extends ArrayAdapter<String> {
    Activity mActivity;
    List<String> wifiName;
    private LayoutInflater inflater;

    public ListAdapter(Activity a, List<String> wifiName) {
        super(a, R.layout.single_list, wifiName);
        mActivity = a;
        inflater = LayoutInflater.from(mActivity);
        this.wifiName = wifiName;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = inflater.inflate(R.layout.single_list, parent, false);
        TextView wifiProvider = (TextView) convertView
                .findViewById(R.id.txt_wifi_provider);
        wifiProvider.setText(wifiName.get(position));
        return convertView;
    }

}
</code>```

Body:
I'm trying to list available wifi network by ScanResult.

Can anyone tell me what's wrong in my code? I'm not getting the desired output.

Here's My code:

public class Activity_scanwifi extends AppCompatActivity {

    Switch aSwitch;
    TextView textView;
    WifiManager wifiManager;
    WifiInfo wifiInfo;
    String info;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.scanwifi);

        aSwitch=(Switch) findViewById(R.id.s);
        textView=(TextView) findViewById(R.id.textView);
        wifiManager=(WifiManager) getSystemService(Context.WIFI_SERVICE);
        wifiManager.startScan();

        aSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                // switch on
                if(isChecked && ! wifiManager.isWifiEnabled())
                {
                    wifiManager.setWifiEnabled(true);
                    wifiInfo=wifiManager.getConnectionInfo();
                }
                // switch off
                if (!isChecked && wifiManager.isWifiEnabled())
                {
                  wifiManager.setWifiEnabled(false);
                }
            }
        });
        broadcast b=new broadcast();
        registerReceiver(b,new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
    }

    public class broadcast extends BroadcastReceiver{
        @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
        @Override
        public void onReceive(Context context, Intent intent) {
            // onReceive method updates any change in the available wifi
            StringBuffer stringBuffer=new StringBuffer();
           /// List<WifiConfiguration> list=wifiManager.getConfiguredNetworks();
            List<ScanResult> list=wifiManager.getScanResults();
            //for(WifiConfiguration wifiConfiguration : list)
            for(ScanResult scanResult : list)
            {
                stringBuffer.append(scanResult);
            }

            textView.setText(stringBuffer);

        }
    }
}

Body:
Try this code:

Manifest Permission:

android:name="android.permission.ACCESS_WIFI_STATE"
  android:name="android.permission.CHANGE_WIFI_STATE"

Activity

public class MainActivity extends Activity implements OnClickListener {

    Button setWifi;
    ListView listViwProvider;

    WifiManager wifiManager;
    WifiReceiver receiverWifi;
    List<ScanResult> wifiList;
    List<String> listOfProvider;
    ListAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        listOfProvider = new ArrayList<String>();
        listViwProvider = (ListView) findViewById(R.id.list_view_wifi);
        setWifi = (Button) findViewById(R.id.btn_wifi);

        setWifi.setOnClickListener(this);
        wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);

        if (wifiManager.isWifiEnabled() == true) {
            setWifi.setText("ON");
            scaning();
        }else {
            wifiManager.setWifiEnabled(true);
            setWifi.setText("ON");
            scaning();
        }

        listViwProvider.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                    ImportDialog action = new ImportDialog(MainActivity.this, (wifiList.get(position)).toString());
                    action.showDialog();
            }
        });
    }

    private void scaning() {
        receiverWifi = new WifiReceiver();
        registerReceiver(receiverWifi, new IntentFilter(
                WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
        wifiManager.startScan();

    }

    @Override
    public void onClick(View arg0) {
        if (wifiManager.isWifiEnabled() == true) {
            wifiManager.setWifiEnabled(false);
            setWifi.setText("OFF");
            listViwProvider.setVisibility(ListView.GONE);
        }
        else if (wifiManager.isWifiEnabled() == false) {
            wifiManager.setWifiEnabled(true);
            setWifi.setText("ON");
            listViwProvider.setVisibility(ListView.VISIBLE);
            scaning();
        }
    }

    protected void onPause() {
        super.onPause();
        unregisterReceiver(receiverWifi);
    }

    protected void onResume() {
        registerReceiver(receiverWifi, new IntentFilter(
                WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
        super.onResume();
    }

    class WifiReceiver extends BroadcastReceiver {

        public void onReceive(Context c, Intent intent) {
            wifiList = wifiManager.getScanResults();
            Collections.sort(wifiList, new Comparator<ScanResult>() {
                @Override
                public int compare(ScanResult lhs, ScanResult rhs) {
                    return (lhs.level > rhs.level ? -1
                            : (lhs.level == rhs.level ? 0 : 1));
                }
            });
            listOfProvider.clear();
            String providerName;
            for (int i = 0; i < wifiList.size(); i++) {
                providerName = (wifiList.get(i).SSID).toString()
                        +"\n"+(wifiList.get(i).BSSID).toString();
                listOfProvider.add(providerName);
            }
            adapter = new ListAdapter(MainActivity.this, listOfProvider);
            listViwProvider.setAdapter(adapter);
            adapter.notifyDataSetChanged();
        }
    }
}

Adapter

public class ListAdapter extends ArrayAdapter<String> {
    Activity mActivity;
    List<String> wifiName;
    private LayoutInflater inflater;

    public ListAdapter(Activity a, List<String> wifiName) {
        super(a, R.layout.single_list, wifiName);
        mActivity = a;
        inflater = LayoutInflater.from(mActivity);
        this.wifiName = wifiName;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = inflater.inflate(R.layout.single_list, parent, false);
        TextView wifiProvider = (TextView) convertView
                .findViewById(R.id.txt_wifi_provider);
        wifiProvider.setText(wifiName.get(position));
        return convertView;
    }

}


问:
How can I print data from a website which uses Aspose?
Not entirely sure how to word this so apologies if it doesn't make sense straight away.

I am on a website which I need to extract all the data from a specific object, it appears to be similar to an online e-book, something you'd see on a university library page etc.

I looked through the HTML and have seen that it uses Aspose:

```<code><meta name="generator" content="Aspose.Words for .NET 15.5.0.0">
</code>```

I was wondering if someone could give me advice or point me in the right direction so I can extract all the data from this online e-book into a pdf that I can use offline?

Thanks,

答:
You can simply load the web page into Aspose.Words for .NET document object model (DOM):

```<code>Document doc = new Document("abc.com/somepage.html");
</code>```

Once the web page is loaded into the Document object, you can choose to extract Selected Content Between Nodes in a Document or convert the entire web page to PDF format by using the following  code:

```<code>Document doc = new Document("abc.com/somepage.html");
doc.Save(MyDir + @"17.6.pdf");
</code>```

Hope, this helps.

I work with Aspose as Developer Evangelist.

Body:
Not entirely sure how to word this so apologies if it doesn't make sense straight away.

I am on a website which I need to extract all the data from a specific object, it appears to be similar to an online e-book, something you'd see on a university library page etc.

I looked through the HTML and have seen that it uses Aspose:

<meta name="generator" content="Aspose.Words for .NET 15.5.0.0">

I was wondering if someone could give me advice or point me in the right direction so I can extract all the data from this online e-book into a pdf that I can use offline?

Thanks,

Body:
You can simply load the web page into Aspose.Words for .NET document object model (DOM):

Document doc = new Document("abc.com/somepage.html");

Once the web page is loaded into the Document object, you can choose to extract Selected Content Between Nodes in a Document or convert the entire web page to PDF format by using the following  code:

Document doc = new Document("abc.com/somepage.html");
doc.Save(MyDir + @"17.6.pdf");

Hope, this helps.

I work with Aspose as Developer Evangelist.


问:
No matching member function for call to "erase"
I try to call erase() function to remove whitespaces in string for function that converts string to integer. The same code works in main() but inside function it doesn't.How can I fix it?</p>

```<code>int convert(const string &line)
{

for (int i=0;i<line.length();i++)
{
    char wh=' ';
    if(line.find(wh))
        line.erase(find(line.begin(),line.end(),' '));

    //cout<<line[i];
}

if(line.length()==0)
    return 0;
int a=line[line.length()-1]-'0';
int b=convert(line.substr(0,line.length()-1))*10;
return a+b;
}
</code>```

答:
try to pass line by value instead of const reference. The const ref can't be changed</p>

```<code>int convert(std::string line)
</code>```

Body:
I try to call erase() function to remove whitespaces in string for function that converts string to integer. The same code works in main() but inside function it doesn't.How can I fix it?

int convert(const string &line)
{

for (int i=0;i<line.length();i++)
{
    char wh=' ';
    if(line.find(wh))
        line.erase(find(line.begin(),line.end(),' '));

    //cout<<line[i];
}

if(line.length()==0)
    return 0;
int a=line[line.length()-1]-'0';
int b=convert(line.substr(0,line.length()-1))*10;
return a+b;
}

Body:
try to pass line by value instead of const reference. The const ref can't be changed

int convert(std::string line)


问:
Docusign API - Recipient and Sender View Timeout
I am using both the REST API and the .NET library to work with Docusign from our site. I was just checking if there were any properties anywhere inside the envelope that let you know if a sender or recipient has the envelope "open" (aka the signing or tagging view URL was loaded, but the user hasn't finished).

Within our web app, we can easily tell when they've "opened" it because when users sign or place tags, they click on one of our own internal links first before being redirected, but unless the user finished the process (either clicking SEND or FINISH or just plain TIMING OUT and getting redirected back to our page), we can't tell is the user currently is looking at the document or if they opened it and then closed it.

So basically, I guess I'm asking if the user closes their browser without sending or signing, is there some kind of date or flag that can tell this?

One follow-up question: Speaking of Timeout, I set ours to 15 minutes. Once you open the console URL to place signature tags or to sign, does the timeout start and then ONLY stop once you've SENT or FINISHED the envelope? Do other actions like scrolling, partially signing, etc reset the timer? Or is it X minutes after the console is open, no matter what?

答:
Sorry, no, the sender view does not offer a ping facility.

In the usual use case, the sender is motivated to send out the envelope for signing. So the problem of the user "abandoning" the sender view is generally not a concern.

You can check the envelope's status periodically or register for a webhook message when the envelope is sent. The envelope will be sent when the sender successfully finishes using the sender view.

If the sender is a concern, I suggest that you not use the sender view. Instead, get the necessary information (docs, recipients, notes, etc) from the sender, then send the envelope programmatically. Use "the Send on Behalf of" (SOBO) feature to send the envelope for the sender.


答:
Try removing const from convert().
Anything declared with const can't be modified.

Title: No matching member function for call to "erase"


问:
Access volume in docker build
I am using docker compose and i have created a volume. I have mulitple containers. I am facing issue to run commands in the docker container.
I have node js container which have separate frontend and backend folders.  i need to run npm install in both the folders.

```<code>version: '2'

services:

### Applications Code Container #############################

    applications:
      image: tianon/true
      volumes:
        - ${APPLICATION}:/var/www/html

    node:
      build:
        context: ./node
      volumes_from:
        - applications
      ports:
        - "4000:30001"
      networks:
        - frontend
        - backend
</code>```

This is my docker file for node

```<code>FROM node:6.10

MAINTAINER JC Gil <sensukho@gmail.com>

ENV TERM=xterm

ADD script.sh /tmp/
RUN chmod 777 /tmp/script.sh

RUN apt-get update && apt-get install -y netcat-openbsd

WORKDIR /var/www/html/Backend

RUN npm install

EXPOSE 4000
CMD ["/bin/bash", "/tmp/script.sh"]
</code>```

my workdir is empty as location /var/www/html/Backend is not available while building but available when i conainter is up. So my command npm install do not work

答:
What you probably want to do, is to ADD or COPY the package.json file to the correct location, RUN npm install, then ADD or COPY the rest of the source into the image. That way, docker build will re-run npm install only when needed.

It would probably be better to run frontend and backend in separate containers, but if that's not an option, it's completely feasible to run ADD package.json-RUN npm install-ADD . once for each application.

Title: Access volume in docker build

Body:
I am using docker compose and i have created a volume. I have mulitple containers. I am facing issue to run commands in the docker container.
I have node js container which have separate frontend and backend folders.  i need to run npm install in both the folders.

version: '2'

services:

### Applications Code Container #############################

    applications:
      image: tianon/true
      volumes:
        - ${APPLICATION}:/var/www/html

    node:
      build:
        context: ./node
      volumes_from:
        - applications
      ports:
        - "4000:30001"
      networks:
        - frontend
        - backend

This is my docker file for node

FROM node:6.10

MAINTAINER JC Gil <sensukho@gmail.com>

ENV TERM=xterm

ADD script.sh /tmp/
RUN chmod 777 /tmp/script.sh

RUN apt-get update && apt-get install -y netcat-openbsd

WORKDIR /var/www/html/Backend

RUN npm install

EXPOSE 4000
CMD ["/bin/bash", "/tmp/script.sh"]

my workdir is empty as location /var/www/html/Backend is not available while building but available when i conainter is up. So my command npm install do not work


问:
Regular Expression: if, else if to use in Java
I am trying to write a regular expression in which I want to compare the URL's.

Any URL Matches
http://*.xyz.com
Except or Excluding
http://m.xyz.com and http://m.product.xyz.com

So far I was trying to do it by using if else in RegExp but I couldn't be able to do it right...

```<code>(^http:\/\/)(((1)<!(m|m\.product))\.xyz\.co\.jp)?
</code>```

答:
You can try that:

```<code>^http:\/\/(?!m\.xyz\.com|m\.product\.xyz\.com).*\.xyz\.com$
</code>```

Regex101 Demo

Body:
I am trying to write a regular expression in which I want to compare the URL's.

Any URL Matches
http://*.xyz.com
Except or Excluding
http://m.xyz.com and http://m.product.xyz.com

So far I was trying to do it by using if else in RegExp but I couldn't be able to do it right...

(^http:\/\/)(((1)<!(m|m\.product))\.xyz\.co\.jp)?

Body:
You can try that:

^http:\/\/(?!m\.xyz\.com|m\.product\.xyz\.com).*\.xyz\.com$

Regex101 Demo


问:
Multithreaded TCP server on background thread- how to force close from main thread
I have GUI application this application starts server by calling
start_server() function. Then there is created TCP passive socket receiving incoming connections in the server loop(we have connection sockets here) and handling them on multiple threads simultaneously.

Now I need some end_server() function that force server and all connections to close. What is the best practice to close such servers.

I consider doing this in such way:

pass to start_server() function some server_info_t structure.

then when passive socket is created its descriptor i stored in server_info_t, there is also stored its binding port number

in server_info_t structure there is on_server_start callback that is called asynchronously after server has been created correctly returning some information about created server like port number on which server is listening (this enable to change GUI controls like status icon from red to green)

then i pass the same structure server_info_t info server_loop and there where new connection from client is coming I will take the connection socket and store its descriptor inside server_info_t structure some linked_list_t or hash_map_t of connection sockets.

now i can invoke some asynchronous callback like on_client_connected and pass handling of connection (connection socket) to another function (separate thread from thread pool), and then server loop waits for next connection. I also need to pass server_info_t structure here to remove connection_socket descriptor from linked_list of conn socket descriptors it connection handling for given client finish.

Here inside struct server_info there can be another callback function on_client_disconnected

Now outside this multithreaded server running in the background I have a GUI app that started the server, and it has the pointer to server_info_t structure that stores all information about server: port number, passive socket, linked_list of actually connected connection sockets (active sockets), callback functions pointers that should be called to inform about server events, etc.
So I think I could then make end_server(server_info_t) (ex. when user clicks STOP in GUI application user interface) and heres the magic happens... server stops. But how?

Should I take all connection sockets (while iteration over linked list in server_info_t structure) and close them using (shutdown + close), and then shutdown + close passive socket?

Then I could even call some callback on_server_end which pointer I found in server_info_t structure.

Should I use some mutex to synchronise access to this server_info_t structure?

答:
Should I use some mutex to synchronise access to this server_info_t structure?

You definitely should synchronize access to the shared data structure.

Should I take all connection sockets (while iteration over linked list in server_info_t structure) and close them using (shutdown + close), and then shutdown + close passive socket?

This is kind of quick and dirty solution. Better design is to inform worker thread the connection should be closed. In this case you can:

Inform clients of the server about reason of the connection shutdown

Complete process of current request

Way to solve "inform" task can be different:

If you use select/poll/epoll methods you can use designated socket (for ex. socketpair) to indicate stop

If you use blocking calls you can use pthread_cancel mechanisms but they are very system-dependent

If your worker thread wakeups periodically you can use kind of atomic flag


问:
Accessing List<Class> elements in Java
Please ignore any beginner mistakes if I make. Following is my issue:

I have a class Item :

```<code>@Entity
@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "item")
public class Item {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
//@ManyToOne
private Long id;
private String stream_item_key;
private String stream_item_date;
private String channel;

@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "item_workflow", joinColumns = @JoinColumn(name = "item_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "workflow_id", referencedColumnName = "id"))
private List<Workflow> workflow;
</code>```

Workflow is another class and Workflow has the following class members:

```<code>    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String actor;
    private String assignee;
    private String date;
    private String team;
    private String action;
</code>```

I have used JPA to join item and workflow and I am able to see the complete extract of the data. However in a different method I am trying to extract only Item.stream_item_date, Workflow.Actor and Workflow.date

I am able to extract Item.stream_item_date using the getStream_item_date() accessor but I am not sure how to access the List elements. I have researched Stackoverflow and I could not find any answers, all of them led to update index and other things. I am not sure if this is the right way to do it?

Thanks in advance for your answers!

答:
```<code>   for(Iterator<?>ui=Item.getWorkflow().iterator()ui.hasNext();){
         Workflow temp= (Workflow) ui.next();
           System.out.print(temp.getActor()); }
</code>```

Title: Accessing List<Class> elements in Java

Body:
Please ignore any beginner mistakes if I make. Following is my issue:

I have a class Item :

@Entity
@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "item")
public class Item {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
//@ManyToOne
private Long id;
private String stream_item_key;
private String stream_item_date;
private String channel;

@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "item_workflow", joinColumns = @JoinColumn(name = "item_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "workflow_id", referencedColumnName = "id"))
private List<Workflow> workflow;

Workflow is another class and Workflow has the following class members:

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String actor;
    private String assignee;
    private String date;
    private String team;
    private String action;

I have used JPA to join item and workflow and I am able to see the complete extract of the data. However in a different method I am trying to extract only Item.stream_item_date, Workflow.Actor and Workflow.date

I am able to extract Item.stream_item_date using the getStream_item_date() accessor but I am not sure how to access the List elements. I have researched Stackoverflow and I could not find any answers, all of them led to update index and other things. I am not sure if this is the right way to do it?

Thanks in advance for your answers!