...check if a page in TWebbrowser is secure (SSL)?

Author: Dev4u.ch
Homepage: http://www.dev4u.ch

Category: Internet / LAN

// You need a TWebbrowser, a TLabel
// Du brauchst einen TWebbrowser, einen TLabel

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
begin
  if 
Webbrowser1.Oleobject.Document.Location.Protocol = 'https:' then
    
label1.Caption := 'Sichere Verbindung'
  else
    
label1.Caption := 'Unsichere Verbindung'
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base