I am using code like this:
echo file_get_contents('https://example.com/file.txt');
In response I get an error:
Warning: file_get_contents(https://example.com/file.txt): failed to open stream: Cannot assign requested address in /sites/example.com/test.php on line 2
As I understand it, the server for some reason forbids accessing the file_get_contents () function if the file is located on the same server. Because queries like this work:
echo file_get_contents('https://example.org');
Help me please. In which direction to dig?