executing php cURL script for long time without changing php.ini settings
Posted
by Pragati Sureka
on Stack Overflow
See other posts from Stack Overflow
or by Pragati Sureka
Published on 2010-01-25T06:33:48Z
Indexed on
2010/03/14
16:25 UTC
Read the original article
Hit count: 228
Scenario
I have a old blog on blogger that contains thousands of images and posts, i have already imported the posts from blogger to wordpress using their import service (which does not import images) now i want to write a php cURL script that will download all the images off my old blogger blog to wordpress.
Problem
I have already written a script that goes through all the posts and find the image links of blogger and download the links recursively and store them local to wordpress installation but the problem is that the script stops if its taking longer than max_execution_time
which is generally set to 30 secs. Now i dont want to change setting in php.ini file.
Is there some way that i can keep my script executing for that long or some other alternative.... like executing in batch or something else...
Reason for not changing php.ini settings is that i want to release this script as opensource plugin for wordpress, and not many have access to their php.ini file on the server and and many don't like changing settings for just one script that might run just once.
Thank You for helping....
© Stack Overflow or respective owner