Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Yes, in the script itself, in the loop, look for any external factor by which to exit - the presence of a file / entry in the database / other things, and according to this condition, do exit / die.
you can find out its PID and execute kill -9 PID
or killall -9 php
make a button redirect to the same page
<button onclick="location.reload()">остановить</button>
in a database, in some table, perhaps you have one - where various parameters are stored, create a parameter, for example, enable_sendmail and a value of 0 or 1. In your script that sends letters, make a request to the database and check this parameter before each sending a letter, then any convenient way to stop the process
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question