Table of Content
HAL Forum
function boolean WebSecureMode (
)
Description:
Determines if secure browsing has been enabled (encrypted data exchange). Returns true if enabled.
function string 255 GetWebHostAndPort(boolean secure)
begin
  record ProgramStatusBlock PSb;
  string 255 res;
  longint l;
  
  res = "";
  if (secure==WebSecureMode) then begin
    res = WebHost;
  end else begin
    res = WebHost;
    l = InString(res,":");
    if (l!=0) then begin
      res = left(res,l-1);
    end;
    
    BlockLoad(PSb);
    if (secure) then begin
      if (PSb.httpsPort!=443) then begin
        res = res & ":" & PSb.httpsPort;
      end;
    end else begin
      if (PSb.httpPort!=80) then begin
        res = res & ":" & PSb.httpPort;
      end;
    end;
  end;
    
  GetWebHostAndPort = res;
  return;
end;
Related topics:
««