Advertisement
Guest User

Untitled

a guest
May 13th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. logen:=Edit1.Text;
  2. pass:=edit2.Text;
  3. otvet:=send('GET', 'https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username='+logen+'&password='+pass+'&captcha_key=&captcha_sid=');
  4. vsego_simvol:=pos('access_token":"', otvet);
  5. skoko_udalit:=vsego_simvol+15;
  6. token:=copy(otvet,skoko_udalit,85);
  7. number_simbol1:=pos('user_id":"', otvet);
  8. kol_simbol1:=number_simbol1+10;
  9. number_simbol2:=pos('}', otvet);
  10. number_simbol3:= number_simbol2-1;
  11. lol:=kol_simbol1-number_simbol3;
  12. id:=copy(otvet,kol_simbol1,lol);
  13. Edit3.Text:=IntToStr(number_simbol1);
  14. Memo1.Lines.Add(''+token+':'+id+'');
  15. Memo1.Lines.SaveToFile('token.txt');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement