Ver Mensaje Individual
  #3  
Antiguo 13-02-2008
sagitarius sagitarius is offline
Registrado
 
Registrado: ene 2007
Posts: 4
Reputación: 0
sagitarius Va por buen camino
Gracias dec.

Googleando he localizado otro codigo mediante componentes indy mas concretamente con el componente TIdHttp.


Código Delphi [-]
procedure TForm1.Button2Click(Sender: TObject);
begin
  IdHTTP1.HandleRedirects:=true;
  IdHTTP1.Head(ComBobox1.Items.Strings[Combobox1.itemIndex]);
  ListBox1.Items.Assign(idhttp1.Response.RawHeaders);
  if IdHTTP1.ResponseCode=404 then
    ListBox1.Items.Add('A File nem letezik')
    else
    begin
     if IdHTTP1.ResponseCode=200 then
     ListBox1.Items.Add('A File letezik')
      else
      ListBox1.Items.Add('Hiba');
      ListBox1.Items.Add('*************************************');
      ListBox1.Items.Add('Visszateresi kod szoveges :'+IdHTTP1.ResponseText);
      ListBox1.Items.Add('Visszateresi kod ertek :'+inttostr(IdHTTP1.Responsecode));
      ListBox1.Items.Add('host:'+IdHTTP1.Request.Host+'   Filenev :'+IdHTTP1.Request.URL);
       if idhttp1.Response.RawHeaders.IndexOfName('Last-Modified') > -1 then
      ListBox1.Items.Add('Utolso modositas datum :'+idhttp1.Response.RawHeaders.Values['Last-Modified'])
       else
      ListBox1.Items.Add('Nincs info az utolso modositasrol');
       if idhttp1.Response.RawHeaders.IndexOfName('Date') > -1 then
      ListBox1.Items.Add('File datum :'+idhttp1.Response.RawHeaders.Values['Date'])
      else
       ListBox1.Items.Add('Nincs info a file datumarol');
        if idhttp1.Response.RawHeaders.IndexOfName('Content-length') > -1 then
      ListBox1.Items.Add('File meret byte :'+idhttp1.Response.RawHeaders.Values['Content-length'])
      else
       ListBox1.Items.Add('Nincs info a file mereterol');
   end;
end;

Última edición por sagitarius fecha: 13-02-2008 a las 03:37:42.
Responder Con Cita