Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- include '../includes/config.php';
- $movie = urlencode($_POST['movie']);
- if($_POST['scelta'] == 'tv' || $_POST['scelta'] == 'movie')
- {
- for($i = 0; $i < 3; $i++)
- {
- $url = "https://api.themoviedb.org/3/search/".$_POST['scelta'].
- "?query=".$movie.
- "&api_key=<<mykey>>&page=".($i+1);
- echo $url ."<br>";
- $output = $class->callApi($url);
- foreach ($output->results as $movie)
- {
- $class->createItemCard($movie, $_POST['scelta']);
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment