ftp_get, ftp_fget - save to a different domain in same account

Hey guys,

When using either the ftp_get or ftp_fget is there a way to save the file to a different subdomain in my account.

For example the php script is running in a domain called sub1.domain.com. I use ftp_get or ftp_fget to grab a file from a remote ftp server and want to store the file in my sub2.domain.com which is a part of the same account.

How can I do this?

Thanks... new at this part of php.
 
Never done it, but looking at the help text on these two functions it seems that it would work. Just provide the explicit (full) path to the subdomain or provide a resource handle to a file in the other subdomain.

If that doesn't work, you could store the file in a temp folder within your current domain and then use the file manipulation functions to move. Of course, that temporarily doubles your disk usage per file.

Tim
 
Back
Top