M
M
MaximDoshi2015-09-08 17:28:04
PHP
MaximDoshi, 2015-09-08 17:28:04

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

2 answer(s)
D
Dokuro, 2015-09-08
Chan @iDokuro

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.

A
Alexander Taratin, 2015-09-08
@Taraflex

In this direction, think
How to check the availability of a third-party resource?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question