Guest User

Untitled

a guest
Jul 31st, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.85 KB | None | 0 0
  1. procedure TMainForm.CHKTimer(Sender: TObject);
  2. var
  3.   Result,Status,Rank:string;
  4. begin
  5.   Http.Request.AcceptLanguage:='en-US,en;q=0.5';
  6.   Http.Request.UserAgent:='Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0';
  7.   Http.AllowCookies:=True;
  8. try
  9.   Result:=Http.Get('https://loveplanet.ru/a-myprofile/');
  10. except
  11. end;
  12.   Status:=Trim(Copy(Result, Pos(PS,Result)+57, Pos('<div class="user_position_unfill">',Result)-63-Pos(PS,Result)-57));
  13.  if Pos('You are very',Status) <> 0 then
  14.  begin
  15.   Rank:=StripNonNumeric(Copy(Result,Pos(RS,Result)+256, 20));
  16.   StatusLabel.Caption:='Status: '+Status+' popular';
  17.   RankLabel.Caption:='Rank: '+Rank;
  18.  end
  19.  else
  20.  begin
  21.    Rank:=StripNonNumeric(Copy(Result,Pos(RS,Result)+256, 20));
  22.    StatusLabel.Caption:='Status: Not enough to rate ;)';
  23.    RankLabel.Caption:='Rank: '+Rank;
  24.  end;
  25. end;
Advertisement
Add Comment
Please, Sign In to add comment