I haven't found a way to run web scripts as root under Debian. YMMV. Check out Webmin, it uses it's own webserver to do similar tasks to you. Finally, you can write a daemon, leave it running as root, and then get the data to it somehow for it to act on.
__________________________
Jeremy