Kodum
Kod: Tümünü seç
function HotmailDogrula(hotmail:string;parola:string):boolean;
const Server='http://www.hotmail.com';
const Err='srf_sErr';
const desen='id="i0327" value="';
const desen2='srf_uPost=''';
Const data='idsbho=1&PwdPad=IfYouAreReadingThisYouHaveTooMuchFr&LoginOptions=2&CS=&FedState=&PPSX=PassportR&type=11&login=%S&passwd=%S&remMe=1&NewUser=1&PPFT=%S&i1=1&i2=2';
var cevap,cevap2,PPFT,action,istek:string;
sl:tstringlist;
begin
sl:=tstringlist.Create;
form1.IdHTTP1.Request.UserAgent:='Mozilla/5.0 (Windows; U; Windows NT 6.0; tr; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14';
form1.IdHttp1.HandleRedirects:=True;
cevap:=form1.IdHTTP1.Get(Server);
form1.Memo1.Lines.add(cevap);
cevap2:=cevap;
cevap:=copy(cevap,pos(desen,cevap)+length(desen),length(cevap));
PPFT:=copy(cevap,1,pos('"',cevap)-1);
cevap2:=copy(cevap2,pos(desen2,cevap2)+length(desen2),length(cevap2));
action:=copy(cevap2,1,pos('''',cevap2)-1);
istek:=Format(data,[stringreplace(hotmail,'@','%40',[rfreplaceall]),parola,PPFT]);
sl.Clear;
sl.Add(istek);
showmessage(form1.IdHTTP1.Response.RawHeaders.CommaText);
savecookies;
setcookies;
form1.IdHTTP1.Get('http://login.live.com/pp550/images/utbkgnd.gif');
form1.IdHTTP1.Request.Referer:=referer;
form1.IdHTTP1.Request.ContentType:='application/x-www-form-urlencoded';
form1.IdHTTP1.Request.ContentLength:=length(sl.Text);
cevap:=form1.IdHTTP1.Post(action,sl);
form1.Memo1.Lines.add(cevap);