unit log;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, WinHttp_TLB;
type
TLogin = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Login: TLogin;
implementation
uses MainUnit, chattt;
{$R *.dfm}
procedure TLogin.Button1Click(Sender: TObject);
var
Winhttp:IWinHttpRequest;
begin
Winhttp := coWinHttpRequest.Create;
winhttp.Open('POST','http://nid.naver.com/nidlogin.login',false);
winhttp.SetRequestHeader('REFERER','http://nid.naver.com/nidlogin.login');
winhttp.SetRequestHeader('CONTENT-TYPE','application/x-www-form-urlencoded');
winhttp.Send('enctp=2&svctype=0&id='+Edit1.Text+'&pw='+Edit2.Text);
Application.ProcessMessages;
begin
winhttp.Open('GET','http://cafe.naver.com/카페이름.cafe',false);
winhttp.Send('');
winhttp.WaitForResponse('');
Application.ProcessMessages;
if POS('카페 매니저', winhttp.ResponseText) > 0 then
begin
showmessage('카페 매니저입니다. 어서오세요');
mainform.Timer1.enabled :=true;
login.visible :=false;
mainform.show;
end
else
if POS('정예멤버', winhttp.ResponseText) > 0 then
begin
showmessage('최신프로그램입니다.');
showmessage('제작자 By.Neptune');
mainform.Timer1.enabled :=true;
login.visible :=false;
mainform.show;
end
else
if POS('1.0버전', winhttp.ResponseText) > 0 then
begin
showmessage('최신프로그램이 나왔습니다.');
showmessage('카페에서 새로 받아주세요.');
showmessage('제작자 By.OO);
Login.close;
end else
begin
showmessage('사용불가! 등급이 아닙니다.???');
login.close;
end;
end;
end;
end.
이런식으로 되있는데
프로그램실행하면 로그인 폼이 뜨질않네요...
저가 짠건아닙니다만..맞는거 같은데 머가 문제죠?