hybmg57 Posted January 4, 2011 Share Posted January 4, 2011 Hi, I would like to transfer some jpg image files from FTP server to my local server and I would like this to be done in a PHP script but I cannot figure out a way to do this without saving in my local harddrive. If anyone have any ideas and share this with us that would be very much appreciated!!! Thank you. Kind regards, Jae Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/ Share on other sites More sharing options...
Adam Posted January 4, 2011 Share Posted January 4, 2011 Have you looked into the PHP FTP functions? Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154591 Share on other sites More sharing options...
hybmg57 Posted January 4, 2011 Author Share Posted January 4, 2011 Yes I did but I would like a way we can transfer files directly to the server without downloading to my local drive first. I think we could save a file in temp when downloading and then use this temp file to ftp_put into the server. I just wanted a server to server transfer... Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154621 Share on other sites More sharing options...
Adam Posted January 4, 2011 Share Posted January 4, 2011 I'm a little confused. Will you be running the script from your "local drive" with a web server installed? By server I assumed you meant you had an external web server you were running the script from. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154623 Share on other sites More sharing options...
hybmg57 Posted January 4, 2011 Author Share Posted January 4, 2011 Hi, Thanks for the reply. No I have two different remote servers and I would like a script that is run by one server, and when run, the files are transferred to the other server in a specific folder and file name. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154629 Share on other sites More sharing options...
Adam Posted January 4, 2011 Share Posted January 4, 2011 Well then on the server that the PHP script is executed, just ftp_put the files to the other server..? No need to go through your local computer. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154630 Share on other sites More sharing options...
hybmg57 Posted January 4, 2011 Author Share Posted January 4, 2011 Hi, great thoughts! But the problem is that the remote server(the one that I'm retrieving files from) is not accessible for me to make any scripts on it... Any other way? Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154638 Share on other sites More sharing options...
Adam Posted January 4, 2011 Share Posted January 4, 2011 Oh.. So you are running the script from a local web server. Unless you have access to the server to execute FTP commands from it, then you'll need to use your local machine to get the files, before putting them to the other server.. unfortunately. You can use the temp directory as you say though, and just unlink them once you're done. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154683 Share on other sites More sharing options...
Kieran Menor Posted January 4, 2011 Share Posted January 4, 2011 Well, then make a script with ftp_get() on the receiving end. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154685 Share on other sites More sharing options...
Adam Posted January 4, 2011 Share Posted January 4, 2011 But the problem is that the remote server(the one that I'm retrieving files from) is not accessible for me to make any scripts on it Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154725 Share on other sites More sharing options...
ignace Posted January 4, 2011 Share Posted January 4, 2011 You are looking for FXP (FTP from server-to-server) not all server's support it though. SmartFTP supports it! http://www.smartftp.com/ Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1154850 Share on other sites More sharing options...
hybmg57 Posted January 5, 2011 Author Share Posted January 5, 2011 FXP is great! This is the definition that I'm after! But how would you do FXP in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1155060 Share on other sites More sharing options...
ignace Posted January 5, 2011 Share Posted January 5, 2011 FXP is great! This is the definition that I'm after! But how would you do FXP in PHP? You should first verify your server has FXP enabled which is unlikely if you don't manage/own the server as FXP allows an FTP-bounce exploit. Quote Link to comment https://forums.phpfreaks.com/topic/223354-ftp-server-to-server/#findComment-1155081 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.