Advertisement
kuchuz

HTC.php

May 26th, 2016
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. <?php
  2. $user="EMAIL@DOMAIN.COM";
  3. $pass="PASSWORD";
  4. $data="email=".$user."&pass=".$pass."&login=Masuk";
  5. $a=l("https://m.facebook.com/login.php",$data);
  6. $a=l("https://www.facebook.com/v1.0/dialog/oauth?redirect_uri=https%3A%2F%2Fwww.htcsense.com%2Fauth%2Ffacebook%2Fcallbacks?-------------------%3ECOPY_THE_TOKEN-----%3E&scope=user_videos,friends_photos,friends_videos,publish_actions,user_photos,friends_photos,user_activities,user_likes,user_status,friends_status,publish_stream,read_stream,status_update&response_type=token&client_id=41158896424&_rdr");
  7. $m=explode('token=',$a);
  8. $m=explode('&',$m[1]);
  9. $m=$m[0];
  10. $f=fopen("token.txt", 'w')or die("ERROR");
  11. fwrite($f,$m);
  12. fclose($f);
  13. echo $m;
  14. function l($l,$p=null){
  15.     $c=curl_init();
  16.     curl_setopt($c,CURLOPT_URL,$l);
  17.     if($p!=null){
  18.         curl_setopt($c,CURLOPT_POST,true);
  19.         curl_setopt($c,CURLOPT_POSTFIELDS,$p);
  20.     }
  21.     curl_setopt($c,CURLOPT_SSL_VERIFYPEER,false);
  22.     curl_setopt($c,CURLOPT_HEADER,true);
  23.     curl_setopt($c,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0");
  24.     curl_setopt($c,CURLOPT_RETURNTRANSFER,true);
  25.     curl_setopt($c,CURLOPT_FOLLOWLOCATION,true);
  26.     curl_setopt($c,CURLOPT_COOKIEFILE,"tok.txt");
  27.     curl_setopt($c,CURLOPT_COOKIEJAR,"tok.txt");
  28.     $e=curl_exec($c);
  29.     curl_close($c);
  30.     return $e;
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement