تجربة للتسجيل الدخول بواسطة ( indy )
#1
السلام عليكم
بعد طلب احد الاعضاء برنامج يقوم بايخبارناهل العضو مسجل او لا
حاولت صنع ها البرنامج

[صورة: 20120612112946.png]

PHP كود :
uses  IdGlobal, IdHash, IdHashMessageDigest;

     function 
_clear(str:string):string ;
     
begin
       Result
:=Trim(str);
       
Result:=StringReplace(str,'<div style="margin: 10px">','',[rfReplaceAll]) ;

       
Result:=StringReplace(str,'<a href="','',[rfReplaceAll]) ;
       
Result:=StringReplace(str,'</div>','',[rfReplaceAll]) ;
       
Result:=StringReplace(str,'</a>',' ',[rfReplaceAll]) ;
       
Result:=StringReplace(str,'</b>',#13#10,[rfReplaceAll]) ;
      // Result:=StringReplace(str,'">',' ( ',[rfReplaceAll]) ;
     
end;
     function 
md5(xx:string):string;
     
begin
with TIdHashMessageDigest5
.Create do
try
    
Result := LowerCase(TIdHash128.AsHex(HashValue(xx)));
finally
    
Free;
end;
end;

procedure TForm1.btn1Click(Sender: TObject);
var 
myp:TStringList;
i:Integer;
begin


 myp
:=TStringList.Create;
 try

   
myp.Add('vb_login_username='+edt1.text+'&vb_login_password=azerty&securitytoken=guest&do=login&vb_login_md5password='+md5(edt2.Text)+'&vb_login_md5password_utf='+md5(edt2.Text)) ;
  
mmo1.Text:= IdHTTP1.Post('http://www.delphi4arab.net/forum/login.php?do=login',myp);
  for 
i:=0 to mmo1.Lines.Count-1 do
  if 
Trim((mmo1.Lines.Strings[i]))='<!-- main error message -->'
  
then
  begin
   mmo2
.Text:=(Trim(StringReplace(mmo1.Lines.Strings[i+3],'<div style="margin: 10px">','',[rfReplaceAll])));
    Break;
  
end;
   finally
     
myp.free;
     
end;
end; 
الرد
#2
test test test
إقتباس :securitytoken=&ajax=1&ajax_lastpost=133900000&message=test%20test%20test&wysiwyg=0&styleid=0&fromquickreply=1&s=&securitytoken=&do=postreply&t=7451&p=who%20cares&specifiedpost=0&parseurl=1&loggedinuser=000
الرد


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم