delphi post 'illegal access' error

Posted by paul on Stack Overflow See other posts from Stack Overflow or by paul
Published on 2010-05-20T22:57:22Z Indexed on 2010/05/20 23:00 UTC
Read the original article Hit count: 384

Filed under:
|
|
|

hello all

im making some delphi simple software which using Idhttp module in indy.

i want to access ' http://mybuddy.buddybuddy.co.kr/userinfo/UserInfo.asp ' this page by

use idhttp's post function.

to open this webpage firstly have to login(http://user.buddybuddy.co.kr/Login/Login.asp),

so i was logged in but problem is

after logged in webpage i can see another login page but when try to

login(http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp) ,

i encountered some error message 'illegal access'.

if anyone help me much appreciate!

        begin
      sl.Clear;
      sl.Add('ID=ph896011');
      sl.add('PWD=pk1089');
      sl.add('SECCHK=0');
      IdHTTP1.HandleRedirects := True;
      IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
      memo1.Text:=idhttp1.Post('http://user.buddybuddy.co.kr/Login/Login.asp',sl);

      if pos('top.location =',Memo1.Text)> 0 then

       begin
        application.ProcessMessages;
        sleep(1000);
        Memo1.Text:= '';
        sleep(300);
        sl2.Clear;
        sl2.Add('PASSWD=pk1089' );
        Memo2.Text := IdHTTP1.Post('http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp', sl2);

        result.Caption := 'login success'  ;
        sleep(300);
        Memo1.Text := '';
        //memo1.Text := IdHTTP1.Get('https://user.buddybuddy.co.kr/Login/Logout.asp');
        //Sleep(1000);
       end;

© Stack Overflow or respective owner

Related posts about delphi

Related posts about idhttp