1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63:
| unit Macro;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, StdCtrls;
type TForm1 = class(TForm) Button1: TButton; WebBrowser1: TWebBrowser; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Button2: TButton; Label4: TLabel; Label5: TLabel; Edit4: TEdit; Edit5: TEdit; Label6: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject); var i: Integer; EncodedStr: string; Header: OleVariant; Post: OleVariant; begin // hier Sollen die Variablen rein... sollen aus nem Tedit herausgelesen werden um genauer zu sein //hier &nick=Ranman &sessionid=3111891762879111351 entry=bla EncodedStr := 'service=getfile&nick=Ranman&sessionid=3111891762879111351&nh=0&file=datei';
// The post must be an array. But without null terminator (-1) Post := VarArrayCreate([0, Length(EncodedStr) - 1], varByte);
// Put Post in array nichts aendern 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://beispiel.de/inhalt?', EmptyParam, EmptyParam, Post, Header); end;
end. |