JSON API: file_get_contents returns false while the content can be fetched by javascript

Viewed 14

https://fbny.org/index.php?option=com_getbible&view=json&p=john3:16&v=cut

This is my own Joomla site and the JSON API above is provided by component "GetBible". For years I've been using the following code to get and display bible verses on the same site:

$content = file_get_contents('https://fbny.org/index.php?option=com_getbible&view=json&p=john3:16&v=cut');

It will return a string containing a JSON string that contains the bible verse.

I am not sure what happened but since yesterday file_get_contents fails and $content becomes a false value. Meanwhile, there is no problem fetching the content from the front-end:

enter image description here

So what could be the reason of this problem?

0 Answers
Related