I am working on a PHP script that is used to create a list of products.
My script:
script.php?start=0&end=500&indexOfFile=0 ->> make a product0.txt file with first 500 products
script.php?start=501&end=1000&indexOfFile=1 ->> product1.txt file with another 500 products
script.php?start=1001&end=1500&indexOfFile=2 ->> product2.txt file with last 500 products
I want to make changes to this script so that it will create all the files automatically.
When I click on the button I want to:
Make the product0.txt file with the first 500 products.
Wait 5 seconds
Make the product1.txt file with another 500 products.
Wait 5 seconds
Make the product2.txt file with the last 500 products.
Can someone help me do this?