Infinitely running PHP script

barigain

Junior Member
Joined
Aug 23, 2012
Messages
100
Reaction score
12
How to run a PHP script on the server that will run after the browser is closed? Can they do this? I have shells to some sites, there trying to run the script.
The script prints the time in .txt file. Launched, closed the browser - works.
Worked script already 1:30 minutes longer does not work.
I also need to organize a permanent job script. Is there any way to get around this limit?
Everywhere it is necessary to such a limit on the duration of the script?
Thanks in advance.
 
Check if you can create a "cron job" on your server. That way you can run the script every minute and without a webbrowser.
 
Yeah "cron job". I have custom made crawlers that works on the VPS and does amazing work. :)
 
or you can use something like tmux which will keep a terminal open.
 
Use cron jobs. If you have cpanel then go to cron jobs manager and set the cron from there. Google "cron jobs tutorial" for more info.
 
Except of cron jobs, you can try the following:
Code:
ini_set("max_execution_time", "99999");  
set_time_limit(0);
ignore_user_abort(1);
 
Thank you all! I figured out the problem and will code new version of my script! Thank you!
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock