I am trying to use the pokeapi.co api and it works fine when I make a file_get_contents request to it on my localhost, but when I put the same file onto my server, it does not work. Another api I have tested has worked and I have the allow_url_open set to on in the ini on my domain, but I still can't seem to get the file_get_contents to work.
<?php
$json = json_decode(file_get_contents('http://pokeapi.co/api/v2/pokemon/charmander'));
echo '<p>'.$json->id.'</p>';
?>