Solved

remote ftp transfer

Posted on 2009-04-15
4
273 Views
Last Modified: 2013-12-12
Hey guys,

I have one file in one FTP account, and I would like to transfer this file from this ftp account, to another one that I have.

For example:

I run this script in my personal ftp account, it will connect to my clients ftp server and download some file to my ftp server.
0
Comment
Question by:fackz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 65 total points
ID: 24154464
Generally, there are no options to do that with simple FTP service.  That is not what FTP is about.  You can initiate an FXP transfer if both servers are configured for it, but most admins shut down that capability, and you'll still need your FTP client to make it happen.

Your easiest solutions:

1) do the transfer manually
2) create a PHP script that logs in to one, downloads, logs in to the other, uploads.
0
 

Author Comment

by:fackz
ID: 24157102
What about the 2 option? do you know where can I find some examples?
0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 65 total points
ID: 24165136
First, read through this section:

http://www.php.net/manual/en/book.ftp.php

Then look here:

http://www.w3schools.com/PHP/php_ref_ftp.asp

Each function has examples that show how it should be used.  It is all rather intuitive, and a working application can be easily built from just the examples found at those two links.  If you still need help at this point, see here:

http://www.google.com/search?q=php+ftp

Start experimenting with the examples, and learn from the work available online.  If you get stuck, bring your specific problem back here.  This project is a bit large to handle in a single question, but we can certainly guide you if hit a roadblock.
0
 
LVL 14

Accepted Solution

by:
shobinsun earned 60 total points
ID: 24165261
Hello,

You can do it with :

First do download the file from one ftp account and then upload to another ftp account.

The following link will help you:

http://in2.php.net/manual/en/function.ftp-get.php

http://www.jonasjohn.de/snippets/php/ftp-example.htm

Regards
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question