blob: f4b32b6fe8f455821fb9feaa1d7decc247b214f5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<?php
/**
* Serverside Script of the Netflix Stats Generator to get information of a movie/series
* @author Marvin Borner
* @copyright Marvin Borner 2018
*/
$RequestedTitle = $_GET["Title"];
$ApiKey = file_get_contents("../../../../ApiKeys/ThemoviedbApiKey.txt");
$ch = curl_init("https://api.themoviedb.org/3/search/multi?api_key=" . $ApiKey . "&language=en-US&query=" . $RequestedTitle . "&page=1&include_adult=true");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$Result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r(json_encode($Result["results"][0]));
|