Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 22-03-2009
c0lo c0lo is offline
Miembro
 
Registrado: ago 2008
Posts: 18
Poder: 0
c0lo Va por buen camino
Bueno usar una conexion FTP para un programa publico no es conveniente ya que si snifeas los archivos se mostraran tus datos, como hosting, user and pass. La mejor solucion es usar un FTPS.

Pero hay una solucion mas sencilla que seria "Uploading File Using Delphi To A Php Upload Script"

Cita:
You can do this using Indy that comes with Delphi. It involves two things. TIdHTTP and TIdMultipartFormDataStream.

Add IdMultipartFormData to your uses clause. Drop TIdHTTP (which is in Indy Clients tab of Component Palette ) on to your form. Set whatever properties of TIdHTTP you want. Now if you were wanting the file to be uploaded after a button has been clicked then put this in the event handler you assigned for the buttons OnClick event.

Código:
procedure TFormClassNameHere.EventHandlerNameHere( Sender : TObject )
var
  Stream            : TIdMultipartFormDataStream;
begin
  Stream := TIdMultipartFormDataStream.Create;
  try
    Stream.AddFile( 'form_field_name_here', 'filename_here', 'content-type_here' );
    IdHTTP1.Post( 'url_here', Stream );
  finally
    Stream.Free;
  end;
end;
Esta seria la solucion mas practica y segura en un sentido, ya que tendrias que proteger tu aplicacion de tal forma no sepan como subes un archivo a tu ftp, ya que podrian meter una shell o algo similar y poder tener el control de tu ftp.. mediante algun tipo de inyeccion.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
enviar un archivo solo con la IP de la pc kurono Varios 13 01-02-2009 10:39:18
Enviar correo a un servidor Carolina Giméne Servers 2 04-12-2007 17:09:54
Enviar cadena de caracteres de cliente a servidor (Sockets) david duarte Providers 5 20-08-2007 20:28:56
enviar string cliente-servidor cocke C++ Builder 2 26-11-2006 00:48:59
enviar fichero a servidor https con SOAP felixgo Internet 3 14-02-2005 20:35:42


La franja horaria es GMT +2. Ahora son las 20:56:37.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi