Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Delphi para la web
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 10-04-2018
dosher81 dosher81 is offline
Registrado
 
Registrado: abr 2018
Posts: 8
Poder: 0
dosher81 Va por buen camino
sigo con la locura, no hay forma de hacerlo funcionar.

el problema es que la pagina web donde quiero acceder es https, con lo que tengo que utilizar ssl y aqui choco contra una pared con la que ya chocaron compañeros del foro y con la que no he encontrado solución hasta la fecha.

pongo algo de código:

Código Delphi [-]
uses: IdMultipartFormData,IdSSLOpenSSL;

procedure Tfautoescuela.FormCreate(Sender: TObject);
var
IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL;
begin
///
 IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(self);
  with idSSLIOHandlerSocketOpenSSL1 do
    begin
      SSLOptions.Method := sslvSSLv2;
      SSLOptions.Mode := sslmUnassigned;
      SSLOptions.VerifyMode := [];
      SSLOptions.VerifyDepth := 0;
      //host := '';
    end;
   IdHTTP1 := TIdHTTP.Create(Self);
  with IdHTTP1 do
    begin
      IOHandler := IdSSLIOHandlerSocketOpenSSL1;
      AllowCookies := True;
      ProxyParams.BasicAuthentication := False;
      ProxyParams.ProxyPort := 0;
      Request.ContentLength := -1;
      Request.ContentRangeEnd := 0;
      Request.ContentRangeStart := 0;
      Request.Accept := 'text/html, */*';
      Request.BasicAuthentication := False;
      Request.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
      HTTPOptions := [hoForceEncodeParams];
    end;
End;

procedure Tfautoescuela.Button1Click(Sender: TObject);
var S: TStringList;
   M: TStream;
begin
 S := TStringList.Create;
 M := TMemoryStream.Create;
 try
   S.Values['nif'] := '455654654S';
   S.Values['fecha-exa'] := '04/01/2018';
   S.Values['tipo-exa'] := 'B';
   S.Values['fecha-nac'] := '18/02/1975';

   IdHTTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
   IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
   IdHTTP1.Post('https://aegranvia.es/resultados', S, M);
   Memo1.Lines.Add(Format('Response Code: %d', [IdHTTP1.ResponseCode]));
   Memo1.Lines.Add(Format('Response Text: %s', [IdHTTP1.ResponseText]));

   M.Position := 0;
   S.LoadFromStream(M);
   Memo1.Lines.AddStrings(S);
 finally
   S.Free;
   M.Free;
 end;

el problema es que TIdSSLIOHandlerSocketOpenSSL me dice undeclared identifier.

ya actualicé a indy10, he descarado las dll y sinceramente no se que mas le puedo hacer

¿se os ocurre algo?

mil gracias!!

Última edición por dec fecha: 10-04-2018 a las 08:23:28. Razón: Poner etiqueta DELPHI
Responder Con Cita
 



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 variables a una pagina y recoger los resultados darkamerico Internet 3 08-11-2016 08:27:23
enviar datos a un formulario en una pagina thecidmx Internet 2 05-06-2013 15:07:30
leer datos de una pagina WEB enmava Varios 1 09-03-2010 17:27:35
Enviar datos de un formulario a una pagina barracuda PHP 3 28-11-2007 21:08:40
Leer datos desde una página Web cone220 Internet 1 16-01-2004 23:03:44


La franja horaria es GMT +2. Ahora son las 18:21:57.


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