Autor Beitrag
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Di 22.03.05 17:12 
Hi,
Er Will einfach nicht Connecten. Hab ich irgendwo nen fehler drinne? Sind die Daten veraltet?
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
Function SendICQMsg(AFromUIN, AToUIN, ATimeout: Integer; AFromName, AFromEmail, AText: String): Boolean;
Var
    SC: TClientSocket;
    csend: String;
    Start, ende: Integer;
Begin
    Result := True;
    SC := TClientSocket.Create(Nil);
    SC.Host := 'wwp.mirabilis.com';
    SC.Port := 80;
    csend := 'POST http://wwp.icq.com/scripts/WWPMsg.dll HTTP/2.0' + #13#10;
    csend := csend + 'Referer: http://wwp.mirabilis.com' + #13#10;
    csend := csend + 'User-Agent: Mozilla/4.06 (Win95; I)' + #13#10;
    csend := csend + 'Connection: Keep-Alive' + #13#10;
    csend := csend + 'Host: wwp.mirabilis.com:80' + #13#10;
    csend := csend + 'Content-type: application/x-www-form-urlencoded' + #13#10;
    csend := csend + 'Content-length:8000' + #13#10;
    csend := csend + 'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*' +
        #13#10 + #13#10;
    csend := csend + 'from=' + AFromName + ' &fromemail=' + AFromEmail +
        ' &fromicq:' + IntToStr(AFromUIN) + ' &body=' + AText + ' &to=' + IntToStr(AToUIN) + ' &Send=';
    Try
        SC.Active := True;
        Start := GetTickCount;
        Repeat
            ende := GetTickCount;
        Until (SC.Socket.Connected) Or ((ATimeout + Start) <= ende);
        If SC.Socket.Connected Then
            Begin
                If SC.Socket.SendText(csend) = 0 then
                    Result := False;
            End
        Else
            Result := False;
        SC.Active := False;
    Except
        Result := False;
    End;
    FreeAndNil(SC);
End;


mfg matze

_________________
si tacuisses, philosophus mansisses.


Zuletzt bearbeitet von matze.de am Mi 23.03.05 09:39, insgesamt 4-mal bearbeitet
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 22.03.05 17:15 
user profile iconmatze.de hat folgendes geschrieben:
Hi,
Er Will einfach nicht Connecten. Hab ich irgendwo nen fehler drinne? Sind die Daten veraltet?
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
Function SendICQMsg(AFromUIN, AToUIN, ATimeout: Integer; AFromName, AFromEmail, AText: String): Boolean;
Var
    SC: TClientSocket;
    csend: String;
    Start, ende: Integer;
Begin
    Result := True;
    SC := TClientSocket.Create(Nil);
    SC.Host := 'wwp.mirabilis.com';
    SC.Port := 80;
    csend := 'POST http://wwp.icq.com/scripts/WWPMsg.dll HTTP/2.0' + #13#10;
    csend := csend + 'Referer: http://wwp.mirabilis.com' + #13#10;
    csend := csend + 'User-Agent: Mozilla/4.06 (Win95; I)' + #13#10;
    csend := csend + 'Connection: Keep-Alive' + #13#10;
    csend := csend + 'Host: wwp.mirabilis.com:80' + #13#10;
    csend := csend + 'Content-type: application/x-www-form-urlencoded' + #13#10;
    csend := csend + 'Content-length:8000' + #13#10;
    csend := csend + 'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*' +
        #13#10 + #13#10;
    csend := csend + 'from=' + AFromName + ' &fromemail=' + AFromEmail +
        ' &fromicq:' + IntToStr(AFromUIN) + ' &body=' + AText + ' &to=' + IntToStr(AToUIN) + ' &Send=';
    Try
        SC.Active := True;
        Start := GetTickCount;
        Repeat
            ende := GetTickCount;
        Until (SC.Socket.Connected) Or ((ATimeout + Start) <= ende);
        If SC.Socket.Connected Then
            SC.Socket.SendText(csend);
        SC.Active := False;
    Except
        Result := False;
    End;
    FreeAndNil(SC);
End;


mfg matze

Jetzt ganz blöde Frage: Ist das mit Absicht "wwp"??
matze.de Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Di 22.03.05 17:18 
Das "wwp" ist schon richtig....

mfg matze

_________________
si tacuisses, philosophus mansisses.
matze.de Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Mi 23.03.05 09:53 
Thema abgehakt, mit der methode geht das heute nicht mehr, ist veraltet, außerdem hat icq nu ne bilderkennung im webpager.

mfg matze

_________________
si tacuisses, philosophus mansisses.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mi 23.03.05 10:35 
user profile iconmatze.de hat folgendes geschrieben:
Das "wwp" ist schon richtig....

Huch... Da war doch letztens was anderes gestanden. ;)

user profile iconmatze.de hat folgendes geschrieben:
Thema abgehakt, mit der methode geht das heute nicht mehr, ist veraltet, außerdem hat icq nu ne bilderkennung im webpager.

Schade. Hätte mir auch gefallen. ;)