I would like to redirect my user to a new page, but the current site continues to run a script that sends a threaded message 10 minutes later at a specified address. I tried something like this:
Header('Location: xy.com');
sleep(100);
do_the_email_sending_here();
But actually it doesn't worked,because the site waited for 100sec, so the site is not immediately redirected me. Any idea how can i solve this? Any idea for while() or for() loop?
Solution for the problem: Cron Job , Good learning.