If your script attempts to make an HTTP connection to a URL on the same server, it will fail. This is called a loopback connection, and we block those connections because they can be exploited by attackers.
Using a local include instead of a loopback connection would be ideal, but if this is not possible, you would need to upgrade to a server package instead of a shared hosting package. You would then have full control over firewall configuration and could choose to allow HTTP loopback connections.
Article ID: 654
Created On: Thu, Apr 9, 2015 at 1:50 PM
Last Updated On: Thu, Apr 23, 2015 at 12:42 PM
Online URL: https://www.heartinternet.uk/support/article/why-can-t-my-script-make-a-connection-to-my-own-website.html