semtex Posted July 7, 2006 Share Posted July 7, 2006 I need to move temporary uploaded files (mostly images through a html form) from one domain on a webserver to another domain on the same webserver. What would be the best way to do this?I mean, I could use php's FTP functions, but I guess that would be an overkill?I can't use the full path to the domain, as this is not accepted by my hosting company. Quote Link to comment https://forums.phpfreaks.com/topic/13950-quickly-moving-files-across-domains-with-php/ Share on other sites More sharing options...
Ninjakreborn Posted July 7, 2006 Share Posted July 7, 2006 Just manually copy and paste them over, it would be the easiest way I think. Or I guess youcould copy the file with php functions, and then place them in another folder, somewhere else just like you would do when someone uploads them, then unlink the file that you had. Quote Link to comment https://forums.phpfreaks.com/topic/13950-quickly-moving-files-across-domains-with-php/#findComment-54364 Share on other sites More sharing options...
semtex Posted July 7, 2006 Author Share Posted July 7, 2006 I can't manually copy and paste them, as they're part of a cms I wrote. The user can upload images through the cms. However, i'd like the images to be stored on the domain of his website, and not on the domain where the cms resides.I can't do it manually cause it needs to happen rightaway. Immediately after the user has uploaded his/her image(s). Quote Link to comment https://forums.phpfreaks.com/topic/13950-quickly-moving-files-across-domains-with-php/#findComment-54366 Share on other sites More sharing options...
kenrbnsn Posted July 7, 2006 Share Posted July 7, 2006 If you don't have direct access to the directory structure of the other domain, I would recommend you use the built in FTP functions. Also, if the other domain moves to a different web server, then your code wouldn't have to change.Ken Quote Link to comment https://forums.phpfreaks.com/topic/13950-quickly-moving-files-across-domains-with-php/#findComment-54373 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.