File_get_contents() return null on production

Hallo guys,
I am trying to fetch this api instagram using file_get_contents().
on localhost i get the data but when i move the script to web hosting or on cloud i get Null.
I have literally tried every single thing but no results. i have used curl but the same, it works just on localhost.

$homepage = file_get_contents('');

  $homepage = json_decode($homepage);

  $data = $homepage->users[0]->user;

after the file_get_contents.