Just about any webcam program can take a picture at an interval and send it to a server. However, every 5 seconds may be a bit much...
I once used a program called crimecatcher that actually detects motion and then starts taking pictures and sending them.
I managed to find a link
Here
It is a free program. Don't know if that help...
Also, you can do a search for "Camera Security" at any of the major download sites... I got a ton of hits. I used
C|net Download