or download this
/* this function creates and executes a perl script to fetch a remote
+file via FTP */
int archive_getfile(const char *remotepath,const char *remotefilename,
+const char *localfilename,const char *ip,const char *user,const char
+*pw,int failifnotfound)
{
...
return r;
}