V
V
vaflya2019-04-02 11:34:06
PHP
vaflya, 2019-04-02 11:34:06

How to run php script without timeout?

If I write a parser that has to process 1.3 million pages. How can I run it so that there is no timeout like through localhost? Through the console?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valentin, 2019-04-02
@romanko_vn

set_time_limit
max_execution_time

M
Moses Fender, 2019-04-02
@mosesfender

Insert somewhere in the script:
set_time_limit(<требуемое количество секунд>);

L
Lander, 2019-04-02
@usdglander

As for me, it's better to pull such a script through the console.
Firstly: No dances with the execution time are needed
Secondly: I prefer to receive some information in the course of the parser's work. The most banal - how many pages have already been worked out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question