Autor Beitrag
Shadowdragon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: Do 06.03.03 15:06 
Hallo!

Folgendes:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
begin
        idhttp1.Connect;
        status.Text := 'Online!' ;
        memo1.lines.add ('')  ;
        memo1.Lines.add ('- Cold Fusion HTTP -')    ;
        memo1.Lines.Add ('')   ;
        memo1.Lines.add ('') ;
        DeleteFile(ziel);
        content := idhttp1.get ('http://www.hertztod.de/cfc-content.txt')  ;
        status.text := 'Downloaden....;
        idhttp1.Disconnect;
end;


Dann bekomme ich die Meldung:
Socket Error #11001

Hängt das vom Server ab, oder ist da ein Fehler im Code?

Danke!

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Do 06.03.03 18:22 
Titel: re
Hi,
ich kenn nur die Fastnet-Kompos, allerdings kann man da nicht nach einem Connect() gleich ein Get() aufrufen, sondern muß das in den OnConnected() Methode verlagern. Wahrscheinlich weil das ganze ja irgentwie asychrone Threads sind.
Versuchs mal damit.
mfg
MSCH
Shadowdragon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: Do 06.03.03 18:25 
Gibt aber leider keine "OnConnected" - Methode...

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Do 06.03.03 18:34 
Titel: sodele
hab grad mal die indies installiert. Also die Komponente TidHTTP, um die es ja wohl geht, hat sehr wohl ein Ereignis OnConnected().
***Grübel****
MSCH
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Do 06.03.03 19:22 
Der Socket Error Code 11001 bedeutet, dass der Host unbekannt ist. Ich würde dort mal nachschauen. :wink:

_________________
If accidentally read, induce vomitting.
M4EiB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Do 06.03.03 19:58 
schon mal ohne
ausblenden Quelltext
1:
2:
3:
idhttp1.Connect; 
....
idhttp1.Disconnect;

probiert?
Shadowdragon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 143

Win 2000
Delphi 6 Pers., Delphi 7
BeitragVerfasst: Do 06.03.03 21:16 
Danke M4, jetzt verbindet er auch.....aber ich bekomme jetzt die Meldung "Moved permanently"... die Datei is aber noch da!

...und wie kann ich die jetzt auf meine Festplatte speichern?

_________________
Ein Programm gleicht dem Prinzip von Jenga:
Viele Bestandteile, wird nach oben hin immer besser, nach unten hin immer instabiler und wenn man was falsch macht klappt der ganze Mist zusammen.
M4EiB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41



BeitragVerfasst: Fr 07.03.03 04:48 
Zitat:
301 Moved Permanently
bedeutet, dass das Dokument unter einer neuen URL zu erreichen ist.
Diese steht im Header und mit
ausblenden Quelltext
1:
idhttp1.Response.Location;					

kannst du sie auslesen.
Die Indy-Komponente kann das auch automaitsch erledigen, dazu musst du
ausblenden Quelltext
1:
 idhttp1.HandleRedirects := true;					

einstellen.
Und mit
ausblenden Quelltext
1:
 idhttp1.RedirectMaximum					

kannst du noch die maximale Anzahl der Weiterleitungen einstellen.