There is a home server with DDNS, it works from the outside, everything is OK. There is a website on PHP hosting, and it needs to check if the server is working.
I read, searched and came across 2 solutions for checking server operation - these are sockets or download any file from the server. It is simple and clear.
As a result, none of them works with DDnS. I can't figure out why. If I specify the direct ip instead of the URL (without the ddns domain), then it doesn't work either
Using file_get_contents (" http: // ". $ Ip. ":". $ Port. " /WorkPage.aspx "); - gives failed to open stream: Connection timed out , and specify the ip and port directly without the ddns domain. Using fsockopen or cURL is the same.
Immediately I enter the same address in the browser - everything works. (typos checked). I open a site from another network - everything works.
Hosting error? How to deal with it and in what direction to dig?