Código PHP:
URL url = new URL("ftp://" + user + ":" + pass + "@" + server + rutaRemota + ";type=i");
URLConnection urlc = url.openConnection();
OutputStream os = urlc.getOutputStream();
BufferedReader br = new BufferedReader(new FileReader(rutaLocal));
int c;
while ((c = br.read()) != -1) {
os.write(c);
}
os.flush();
os.close();
br.close();
gracias