procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
EncodedStr: string;
Header: OleVariant;
Post: OleVariant;
begin
// Make the post string URL encoded
EncodedStr := 'name=SwissDelphiCenter.ch&text=Test Guestbook entry';
// The post must be an array. But without null terminator (-1)
Post := VarArrayCreate([0, Length(EncodedStr) - 1], varByte);
// Put Post in array
for I := 1 to Length(EncodedStr) do
Post[I - 1] := Ord(EncodedStr[I]);
Header := 'Content-Type: application/x-www-form-urlencoded' + #10#13;
WebBrowser1.Navigate('http://www.swissdelphicenter.ch/en/addguestsent.php', EmptyParam,
EmptyParam, Post, Header);
end;