diff options
Diffstat (limited to 'assets/php/getInformation.php')
-rw-r--r-- | assets/php/getInformation.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/php/getInformation.php b/assets/php/getInformation.php index f4b32b6..c5f3ea2 100644 --- a/assets/php/getInformation.php +++ b/assets/php/getInformation.php @@ -5,10 +5,10 @@ * @copyright Marvin Borner 2018 */ -$RequestedTitle = $_GET["Title"]; +$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=" . $RequestedTitle . "&page=1&include_adult=true"); +$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); |