0

I’m trying to call a URL and read its content using php. when I place the url directly in the browser It works, but when I use php it returns empty string. here’s my code:

$url = "https://www.instagram.com/instagram/?__a=1"
$json = file_get_contents($url);
$res= json_decode($json);
var_dump($res);

Does anyone have an idea why I can’t read the file with PHP? Thank you,

Anass Hl
  • 1
  • 3

0 Answers0