Answer the question
In order to leave comments, you need to log in
Get request to server in php?
Conditions:
There is a company website written in Yii.
There is a company server located in their local network.
Task:
Make a Get request to the server on the given system admin ip, get a json file in response.
Get request must be executed from the site - as I understand it, access for its ip is open.
What happens to me: I
execute such commands -
$data - параметры запроса
$querydata = http_build_query($data);
file_get_contents("https://196.307.42.46:88/?" . $querydata);
failed to open stream: Connection refused
Me: "I'm making a request and it doesn't return anything. Error."
He: "What address is the request coming from?"
Me: "Must be from a site...so-and-so...?"
He: "yes, I made a forwarding from him
forwarded port 80 for the site address ... such and such ... to the server address",
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question