Hello. The task is the following, there is a large unloading of goods, the problem is that when downloading pictures, and there are about a few thousand ~ 7000-8000, the server does not have time to process the whole thing, which is logical.
How can you stop the script, for example, after 100 downloads of pictures, and then restore it at the moment of stopping.
My assumption is that you can write the entire array of pictures with a key to a temporary file, then run for `and when it reaches 100 to reload the page, but to transfer to GET where we stopped and run from that place. Tobish turns out, we ran the first 100 products, then passed the parameter script.php? Id = 100 and already from 100 we run to 200 and so on until the end until the array is finished.
The question is, how correct are my assumptions or is it easier to think of something?
UPD
Unloading from another server to your base
сервер не успевает обработать все это дело- and what happens to the server, it gets tired and goes on vacation? - Nick Volynkin ♦