Hello stackoverflow users. I need to pull some movie information from the Open Movie Database API. They have no docs on how to use their API so i am very confused. The site i am creating in PHP needs to pull some variables or strings from their api depending on what imdb ID i put in an form. Here is the code i got so far. This gives me: "http://www.omdbapi.com/?i=tt1092026". But i need to get the strings of their API and make them to variables so i can use them in forms later. How do i do this? Please help. Thanks! :D
<form action="?action=grab" method="post">
<input placeholder="tt1092026" type="text" name="id" id="id">
<input type="submit" class="button" value="Grab Movie">
</form>
<?php if ($_GET[action] == "grab") { ?>
<h9>
<?php
$id = $_POST["id"];
$url = "http://www.omdbapi.com/?i=$id";
echo $url;
?>
</h9>
<?php }; ?>