لا استطيع ارسال تسجبل الدخول بشكل جيد
#3
السلام عليكم
PHP كود :
var
 
 HTTP: THTTPClient;
 
 Params: TStringList;
 
 Response, Token: string;
 
 P: Integer;
begin
  HTTP 
:= THTTPClient.Create;
 
 Params := TStringList.Create;
 
 try
    Response 
:= HTTP.Get('https://uploadfiles.io/login').ContentAsString;
 
   P := Pos('"csrf_test_name" value="', Response);
 
   if P > 0 then
    begin
      Token 
:= Copy(Response, P + Length('"csrf_test_name" value="'), 32);
 
     Params.Add('csrf_test_name=' + Token);
 
     Params.Add('email=xxx@xxx.xxx');
 
     Params.Add('password=*******');
 
     HTTP.Post('https://uploadfiles.io/login', Params);
 
     Response := HTTP.Get('https://uploadfiles.io/dashboard').ContentAsString;
 
     if Pos('"fa fa-sign-out"', Response) > 0 then
        ShowMessage
('Logged in successfully.');
 
   end;
 
  finally
 
    HTTP.Free;
 
    Params.Free;
 
  end;
end; 
سبحان الله وبحمده سبحان الله العظيم
[-] كل من 1 user says قال شكرا ل Agmcz على المشاركة المفيدة
  • mohamed49
الرد


الردود في هذا الموضوع
RE: لا استطيع ارسال تسجبل الدخول بشكل جيد - بواسطة Agmcz - 22-01-2018, 12:44 AM

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


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