Autor Beitrag
zero_cool1986
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Mo 18.02.08 21:54 
Hi, liebe Community, ich möchte gerne über die Indykomponente idhttp
2 Werte an ein php Formular übergebn und
den submit-button klicken,
als rückantwort soll dan kommen sie sind eingeloggt , oder leider nicht geklappt !
kann mir wer paar ansätze geben, wie das geht
mfg
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 18.02.08 22:08 
Moin!

user profile iconzero_cool1986 hat folgendes geschrieben:
kann mir wer paar ansätze geben, wie das geht
Klar: Suche in: Delphi-Forum, Delphi-Library IDHTTP POST :D

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Mo 18.02.08 22:21 
Ja hab ich auch gefunden, aber mir wird nicht ersichtlich wie der Code an den Formularnamen kommt , also zB das Username Feld
<input vale="name" name="username">
und so weiter

wo trage ich das ein?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
var 
  data: TIdMultiPartFormDataStream; 
begin 
  data := TIdMultiPartFormDataStream.Create; 
  try 
    { add the used parameters for the script } 
    data.AddFormField('param1''value1'); 
    data.AddFormField('param2''value2'); 
    data.AddFormField('param3''value3'); 

    { Call the Post method of TIdHTTP and read the result into TMemo } 
    Memo1.Lines.Text := IdHTTP1.Post('http://localhost/script.php', data); 
  finally 
    data.Free; 
  end;


---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

ok ich habs jetzt , wie kann ich testen ob der Login erfolgreich war?
LexXis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 170
Erhaltene Danke: 3



BeitragVerfasst: Do 21.02.08 05:24 
Du schreibst doch die Antwort des Servers in dein Memo1.
Ich weiß jetzt nicht, WO Du dich da einloggen möchtest, aber wenn das Passwort falsch war, dann teilt Dir die Seite das ja im Regelfall mit. Guck einfach in deinem Memo nach, ob du da was entsprechendes findest, ansonsten kannst Du davon ausgehen dass Du eingeloggt bist. Wahlweise auch umgekehrt.

Stichwort zur Suche: Pos();

lg