Scenario:
Questions:
dude:
I have a couple things you can try, no gaurantees though...
Try adding a sleep command to your loop to slow it down: http://us2.php.net/manual/en/function.sleep.php This should lessen CPU consumption but will make the script take longer to execute.
Try running the script via a lynx shell command: http://us2.php.net/manual/en/ref.exec.php Take a close look at proc_nice down the page. This should allow you to continue executing code and using the application while the loop runs.
Consider writing the script in perl and run it via a wrapper.
Consider having the script que as a cron job to run at off-peak hours.
Maybe someone else will have better suggestions.
PHP via CLI.
And, what are you inviting 10000 people to do? ...if this is spam, why should we worry about your CPU consumption?