var
Source:
string;
s:
string;
Response:
string;
PostParams: TIdMultiPartFormDataStream;
const
AddPageURL = '
http://tanken.extragewinnspiel.de/index.php?';
begin
IdHTTP1.CookieManager := CookieMgr;
IdHTTP1.Request.ContentType := '
text/html';
IdHTTP1.Request.AcceptCharSet := '
ISO-8859-1';
IdHTTP1.Request.AcceptLanguage := '
DE';
IdHTTP1.HandleRedirects := true;
PostParams := TIdMultiPartFormDataStream.Create;
PostParams.AddFormField('
user_email', '
email@blubb.de');
PostParams.AddFormField('
agb_in_use', '
1');
PostParams.AddFormField('
user_agb', '
1');
PostParams.AddFormField('
datenschutzbestimmung_in_use', '
1');
PostParams.AddFormField('
user_datenschutzbestimmung', '
1');
PostParams.AddFormField('
form_next', '
');
//Bis hier gehts läd auch die nächste seite...
//diese daten werden zwat in die formular felder "eingefügt" aber wird nicht abgesendet :(
PostParams.AddFormField('
user_anrede', '
Frau');
PostParams.AddFormField('
user_vorname', '
name');
PostParams.AddFormField('
user_nachname', '
nachname');
PostParams.AddFormField('
user_strasse', '
blastr');
PostParams.AddFormField('
user_hausnummer', '
13');
PostParams.AddFormField('
user_plz', '
21343');
PostParams.AddFormField('
user_ort', '
Entenhausen');
PostParams.AddFormField('
user_land', '
Deutschland');
PostParams.AddFormField('
user_geburtstag', '
11');
PostParams.AddFormField('
user_geburtsmonat', '
1');
PostParams.AddFormField('
user_geburtsjahr', '
1988');
PostParams.AddFormField('
user_vorwahl', '
43215');
PostParams.AddFormField('
user_rufnummer', '
21341');
PostParams.AddFormField('
user_mobilfunknummervorwahl', '
');
PostParams.AddFormField('
user_mobilfunknummerrufnummer', '
');
PostParams.AddFormField('
form_next','
');
Source := IdHTTP1.Post(AddPageURL, PostParams);
memo1.Lines.Text := source;
with TStringList.Create
do
try
Text := Source;
SaveToFile('
D:\test.html');
//speichern
finally
Free;
end;
PostParams.Free;
memo1.Text :=(s);
end;