I'm using a movie api(https://www.themoviedb.org/documentation/api), the api only gives me 20 results per page, i want to get 60, so i make 3 requests for 3 pages. I dont know if i have to use json encode or decode the response but this works for the first result list:
$url1 = "http://api.themoviedb.org/3/movie/upcoming?api_key=###&page=1&language=de";
$url2 = "http://api.themoviedb.org/3/movie/upcoming?api_key=###&page=2&language=de";
$url3 = "http://api.themoviedb.org/3/movie/upcoming?api_key=###&page=3&language=de";
$response1 = file_get_contents($url1);
$response2 = file_get_contents($url2);
$response3 = file_get_contents($url3);
echo $response1;
I dont know how to put the results of the second and third request into 'results':
angular part
a.filme = []; //declare an empty array
$http({
method: 'GET',
url: 'data/call-api.php'
}).then(function (response){
a.filme = response.data.results;
console.log(response.data);
},function (error){
console.log("JSON konnte nicht geladen werden: " + error.status + error.statusText);
});
the reponse in the browser of the api (http://api.themoviedb.org/3/movie/upcoming?api_key=###&page=1&language=de) looks like this:

Thanks in advance :)
