Ver Mensaje Individual
  #2  
Antiguo 07-08-2003
Avatar de __hector
[__hector] __hector is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Santo Domingo, Rep. Dom.
Posts: 1.075
Reputación: 25
__hector Va por buen camino
Puedes utilizar Sockets para hacer una peticion http al servidor, y el mismo te devolveria el contenido html de la pagina en cuestion.

Un pequeño ejemplo, utilizando ClientSocket:
Host: 207.105.75.31
Port: 80
Active : True


Código:
procedure TForm1.Button1Click(Sender: TObject);
begin
   with cs.Socket do begin
      SendText('GET http://www.borland.com/products/index.html HTTP/1.1'+#13#10);
      SendText('Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-excel, */*'+#13#10);
      SendText('Accept-Language: es'+#13#10);
      SendText('Accept-Encoding: gzip, deflate'+#13#10);
      SendText('User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'+#13#10);
      SendText('Host: www.borland.com'+#13#10);
      SendText(''+#13#10);
   end;
end;
En el evento Onread del ClientSocket, añado el resultado a un memo:

Código:
   memo1.Lines.Add(cs.Socket.ReceiveText);
Existen variantes, como si la pagina se genera despues de enviarle algun dato en la URL (QueryString), o si se obtiene despues de rellenar algun formulario, pero ya dependera de cada caso. Mientras tanto, esa es una forma genérica.
__________________
Héctor Geraldino
Software Engineer
Responder Con Cita