Forum Moderators: coopster

Message Too Old, No Replies

Is there a way to optimize my program?

         

cody7

4:39 am on Apr 8, 2005 (gmt 0)

10+ Year Member



Hi,

My Program is about parsing website through their url, My program is working properly but everytime it enters URL with so many sub URL (i mean thousand) my program seem to stop responding. Can you suggest something to this problem. somebody told me that i use the sleep() fucntion to not force my script to run successively, to give a pause to my program. Any thing more you can suggest? i'm not after the speed of execution but what im after is that he finish his job no matter how much time it takes. Thank you for any help...

ironik

5:00 am on Apr 8, 2005 (gmt 0)

10+ Year Member



You could use sleep() and/or use set_time_limit().

Sleep pauses the script execution, whereas set_time_limit() sets the time the script is allowed to run for before timing out (default 30 seconds).

When the script times out it will normally tell you, if it stops responding then it might be something else...