I'm looking to write up a PHP script that can query 10,000 monero private keys to get its balance. Once the balance is updated, it will be stored in a mysql database. I know scanning the monero blockchain can take quite some time for each address. Each of my users have a shared monero "private key" where they have access to the funds as do I. I want to create a website that keeps track of the balances in these addresses.
I was thinking of scanning each address initially even if it takes awhile. Then keep track of the last scanned height and start from there again on a 5-10 minute cron run. I'm not sure if this is the best method and would like to know if there are other good solutions to this problem?