Answer the question
In order to leave comments, you need to log in
Get_headers takes too long to get information about a remote file, what should I do?
At the very beginning of the page loading, I check the existence of the remote file using the Get_headers() function and then form the page content using the received data. There is a problem, accessing some files is too long - I get "504 Gateway Time-out". How to solve this problem? How to limit the time for Get_headers() or something to do so that the "504 Gateway Time-out" error does not occur. Even if Get_headers() doesn't return anything, it doesn't throw an error either.
Answer the question
In order to leave comments, you need to log in
Increase timeout? Or maybe it's better to find out what the problem is and write the code? Write what you are trying to implement.
In this direction, think
How to check the availability of a third-party resource?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question