blob: c5f3ea2fb0139b8b950e4865c80a460df93afaf0 (
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 = $_POST["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=" . urlencode($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]));
|