Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user="EMAIL@DOMAIN.COM";
- $pass="PASSWORD";
- $data="email=".$user."&pass=".$pass."&login=Masuk";
- $a=l("https://m.facebook.com/login.php",$data);
- $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");
- $m=explode('token=',$a);
- $m=explode('&',$m[1]);
- $m=$m[0];
- $f=fopen("token.txt", 'w')or die("ERROR");
- fwrite($f,$m);
- fclose($f);
- echo $m;
- function l($l,$p=null){
- $c=curl_init();
- curl_setopt($c,CURLOPT_URL,$l);
- if($p!=null){
- curl_setopt($c,CURLOPT_POST,true);
- curl_setopt($c,CURLOPT_POSTFIELDS,$p);
- }
- curl_setopt($c,CURLOPT_SSL_VERIFYPEER,false);
- curl_setopt($c,CURLOPT_HEADER,true);
- curl_setopt($c,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0");
- curl_setopt($c,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($c,CURLOPT_FOLLOWLOCATION,true);
- curl_setopt($c,CURLOPT_COOKIEFILE,"tok.txt");
- curl_setopt($c,CURLOPT_COOKIEJAR,"tok.txt");
- $e=curl_exec($c);
- curl_close($c);
- return $e;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement