Autor Beitrag
Prinz_Inside
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Mi 10.11.04 18:56 
hi!
hab schon gesucht aber nix brauchbares gefunden.. :cry:
jedenfalls mache ich eine post-anfrage an ein skript auf meinem localhost.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Button1Click(Sender: TObject);
var params:tstringstream;result:tmemorystream;
begin
params:=tstringstream.Create('');
params.WriteString('username='+edit1.Text);
params.WriteString('passwort='+edit2.Text);
result:=tmemorystream.Create;
idhttp1.Post('http://localhost/post.php',params,result);
memo1.lines.loadfromstream(result);


so, wieso bleib jetzt mein memo leer?
mein skript soll einfach erst ma nur username und passwort echoen!
aber im memo kommt ja nix,nur dass es ganz leer wird..wie kann man des auslesen, was des skript zurückgibt?
endeffects
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Do 11.11.04 12:35 
ich würde dir empehlen mal mit nem packet sniffer zu prüfen
welche daten übertragen werden, evtl bekommst du aufgrund
eines fehlers auch überhaupt keine antwort

such dazu am besten mal nach
etherdetect oder charles+proxy bei google
endeffects
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Do 11.11.04 12:37 
und wenn ich nun nicht völlig falsch liege
solltest du mal folgendes probieren:
ausblenden Delphi-Quelltext
1:
2:
3:
var source: string;
begin
source:= idhttp1.Post('http://localhost/post.php',params);
Prinz_Inside Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Do 11.11.04 15:47 
Zitat:
und wenn ich nun nicht völlig falsch liege
solltest du mal folgendes probieren:
ausblenden Delphi-Quelltext
1:
2:
3:
var source: string;  
begin  
source:= idhttp1.Post('http://localhost/post.php',params);


dann bekomm ich folgenden fehler:
ausblenden Delphi-Quelltext
1:
2:
[Error] Unit1.pas(44): There is no overloaded version of 'Post' that can be called with these arguments
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'

habe indy 10 vorher hatte ich 9 und auch den fehler..
was kamn ich machen?

mfg
tim
endeffects
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Do 11.11.04 18:54 
mein fehler

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
var
  PostDataStream : TStringStream;
  ParamData : TStringStream;
begin
  PostDataStream := TStringStream.Create('');
  ParamData := TStringStream.Create('');

  ParamData.WriteString('hier die parameter die übergeben werden soll');
  try
    IdHTTP.Post(FLoginUrl, ParamData, PostDataStream);

  except
    //..
  end;
Prinz_Inside Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Do 11.11.04 19:59 
och menno..
jetzt bekomm ich den fehler:
"Error reading idhttp1.allowcookies:property allowcookies does not exist"
aber ich hab diese property nirgends benutzt..
endeffects
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Do 11.11.04 20:06 
na in dem code steht auch idhttp.post.... und nicht idhttp1.post
vielleicht liegts daran?
Prinz_Inside Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Do 11.11.04 20:17 
ne das hatte ich geändert..
hab jetzt die 10er wieder runtergeworfen und 6 drauf und wenn ich jetzt noch "memo1.Lines.LoadFromStream(postdatastream);" dazumach um das result zu sehen is es memo wieder leer wie ganz am anfang..*heul*
hat jemand ne ideee?
Prinz_Inside Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Fr 12.11.04 18:02 
*push* :?
Prinz_Inside Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 29



BeitragVerfasst: Sa 13.11.04 12:46 
jetzt gehts! hat irgendwie dran gelegen, dass ich D6 hatte, hab mir jetzt D7 Pers installiert und siehe da, es geht!

trotzdem danke für die hilfe!