There are 2 servers. One chief, the other mediator. The task is as follows: The main server wants to receive content from another site through an intermediary server, that is, by proxying.
The main server sends a GET request:
file_get_contents('http://сервер_посредник?url=http://someurl') The proxy server opens the requested link and sends the content:
echo file_get_contents($_GET['url']) The fact is that when accessing an intermediary server through a browser, the required content from http: // someurl is displayed. And when accessing through the main server, there is a long wait, and then just time out. I tried to put on the mediation server just echo 'test123' to make sure that the mediation server is available for the main server. As a result, the main server receives output from echo , and as soon as I add file_get_contents , a long wait.
wget/curlwith the same URL running from the server? - vp_arthecho 'test123'after all receives, exactly when I addfile_get_contents, it does not load anything. - Max_Payne