Autor Beitrag
Andi1982
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: Fr 21.05.04 12:58 
Hallo,
ich greife so:

memo1.text := idhttp1.get('http://www.seite.de/seite.htm'); auf den quelltext einer seite zu.

aber jetzt habe ich eine seite bei der man erst ein passwort und benutzername angeben muss. dann kommt immer ein abbruch "403 Forbidden."

Kann man den benutzernamen und passwort vielleicht irgendwie mitgeben oder in der IdHTTP-Komponente hinterlegen??

Gruss andreas

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 21.05.04 16:28 
jup kann man. schau dir mal die eigenschaften request.username und request.password an !!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andi1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: Fr 21.05.04 17:32 
hab ich schon versucht, geht aber nicht... kommt immernoch der 403... muss ich noch ne andere eigenschaft setzen damit das abgefragt wird??

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 22.05.04 10:13 
eigendlich nicht. auf welche seite willst du denn zugreifen ?? vielleicht können wir das am konkreten problem lösen ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andi1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: Sa 22.05.04 13:37 
hmm,
vielleicht ist das ja doch kein htaccess geschützter bereich. Aber was dann... die seite auf die wir zugreifen müssen ist die: eu-c.redclouds.com/g...t/main/Pictures.html

einloggen tut man sich normalerweise da: auth.redclouds.com/member4

zugangsdaten geben wir hier aber nicht bekannt, auch wenn die eh schon viele haben...

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 23.05.04 10:09 
aha. du musst die zeugangsdaten nicht als basic atuentifiaction im HTTP header übergeben, sondern als HTTP Post Data !
dazu musst du dir mal anshcauen, wie die felder heissen die den namen und das passwort enthalten.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andi1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: So 23.05.04 12:56 
ok, jetzt mache ich das so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.Button3Click(Sender: TObject);
var Users: TStrings;
begin
   Users.Add('username=NameHalt');
   Users.Add('password=PWhalt');
   idhttp1.Post('http://auth.redclouds.com/login.cgi', Users);


aber dann kommt beim compilieren schon folgende meldung: "Es gibt keine Überladene Version von 'Post', die man mit diesen Argumenten aufrufen kann"

aber ich dachte tstrings kann man verwenden...

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 23.05.04 13:32 
richtig isses erst mal so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Button3Click(Sender: TObject);
var Users: TStringList;
begin
  Users := TStringList.Create;
  Users.Add('username=NameHalt');
  Users.Add('password=PWhalt');
  idhttp1.Post('http://auth.redclouds.com/login.cgi', Users);
  FreeAndNil(Users);
end;


und bei mir funkt das mit den PostParametern...

raziel

_________________
JSXGraph
Andi1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: Mo 24.05.04 16:41 
Bei mir funktionierts leider immernoch nicht... bekomme immernoch den Fehler beim Compile...
muss ich an der IdHTTP-Kompo noch was anderes einstellen oder so??

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 24.05.04 18:10 
sag doch bitte immer dazu was für ein fehler er beim kompilieren bringt !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andi1982 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 497

WinXP HE
D6 Enterprise
BeitragVerfasst: Mo 24.05.04 18:18 
Das hatte ich weiter oben schon, aber kanns auch gerne nochmal posten.

Andi1982 hat folgendes geschrieben:

...
aber dann kommt beim compilieren schon folgende meldung: "Es gibt keine Überladene Version von 'Post', die man mit diesen Argumenten aufrufen kann"
...

_________________
Solange die Bombe tickt ist alles in Ordnung, erst wenn sie damit aufhört wird es problematisch...