Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2008.03.23;
Скачать: CL | DM;

Вниз

чат   Найти похожие ветки 

 
Res   (2008-02-23 01:05) [0]

Пытаюсь авторизоватся в чате chat.mail.ru, ниче не получается, подскажите пожалуйста как можно авторизоватся.
var
mainpage:string;
page:TStringStream;
int:array[1..30] of integer;
post:Tstrings;
x:integer;
begin
x:=0;
page:=Tstringstream.Create("");
 try
 form1.IdHTTP1.Get("http://chat.mail.ru/", page);
 except
 end;
mainpage:=page.DataString;
page.Free;
int[1]:=Pos("<select name=room", mainpage);
     while (int[1]<>0) do
     begin
     Inc(x); //Увеличиваем x
     setlength(form1.chatlist, x+3);
     int[1]:=PosEx("<option value=", mainpage, int[1]+1);
     int[2]:=PosEx(""", mainpage, int[1]+1);
     int[3]:=PosEx(""", mainpage, int[2]+1);
     int[4]:=PosEx(">", mainpage, int[3]+1);
     int[5]:=PosEx("<", mainpage, int[4]+1);
     form1.chatlist[x]:=copy(mainpage, int[2]+1, int[3]-int[2]-1)+"|"+copy(mainpage,int[4]+1, int[5]-int[4]-1);
     end;
     for x:=1 to 2{length(form1.chatlist)-1} do
     begin
     post:=Tstringlist.Create;
     page:=Tstringstream.Create("");
     post.Add("page=http://1.chat.mail.ru/");
     post.Add("enter=1812");
     post.Add("Login="+form1.Edit1.Text);
     post.Add("Domain="+copy(form1.ComboBox1.Text, 2, length(form1.ComboBox1.Text)));
     post.Add("Password="+form1.Edit2.Text);
     post.Add("nick="+form1.Edit3.Text);
     post.Add("room="+form1.chatlist[x]);
       try
       form1.IdHTTP1.Post("http://my.chat.mail.ru/cgi-bin/auth", post);
       showmessage("все ок1");
       except
       end;
       try
       form1.IdHTTP1.Get("http://1.chat.mail.ru/cgi-xml/chat", page);
       showmessage("все ок2");
       except
               showmessage("все не ок2");
       end;
     mainpage:=page.DataString;
     form1.Memo1.Lines.Add(mainpage);
     page.Free;
     post.Free;
     end;

end;


 
KilkennyCat ©   (2008-02-23 07:51) [1]

наивный.


 
Res   (2008-02-23 10:45) [2]

Да, я пытался сделать, но не получилось))) Может подскажите что нить?)



Страницы: 1 вся ветка

Текущий архив: 2008.03.23;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.019 c
2-1203672334
Ковалев Г.Н
2008-02-22 12:25
2008.03.23
Borland Delphi 2006


2-1203790163
hex
2008-02-23 21:09
2008.03.23
Скрыть консольное приложение


15-1202610413
turbouser
2008-02-10 05:26
2008.03.23
Эй, админы...


15-1202490531
@!!ex
2008-02-08 20:08
2008.03.23
Проверка орфографии в OpenOffice


2-1204023772
Washington
2008-02-26 14:02
2008.03.23
Прозрачность