With MiCam you can use your iPhone as a webcam. Select the frequency at which automatically taken pictures are uploaded to an FTP server.