LAN Web TCP Delphi

Title: How to realize a Wake on Lan? (Magic Packet)
procedure TForm1.Button1Click(Sender: TObject);
var
Data, temp: string;
k, n: integer;
begin
Data := '';
for k := 0 to 5 do
begin
Data := Data + Chr(StrToInt('$FF')); // 6x add a FF / 6x ein FF hinzuf¨¹gen
end;
temp := StringReplace(Edit1.Text, '-', '', [rfReplaceAll]);
for k := 0 to 15 do
begin
temp := StringReplace(Edit1.Text, '-', '', [rfReplaceAll]);
for n := 0 to 5 do
begin
// 16x add Target-Mac-Adress
Data := Data + Chr(StrToInt('$' + temp[1] + temp[2]));
Delete(temp, 1, 2);
end;
end;
Usage Example:
//IdUDPClient1.Send('255.255.255.255', '80', Data); // Send it / Verschick es
end;