document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2.   /** me@dwisiswanto.my.id **/
  3.  
  4. function curl($url, $postData = null, $head = null) {
  5.     $ch = curl_init();
  6.     curl_setopt($ch, CURLOPT_URL, $url);
  7.     if ($postData != null){
  8.         curl_setopt($ch, CURLOPT_POST, true);
  9.         curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
  10.     }
  11.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  12.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  14.     curl_setopt($ch, CURLOPT_COOKIESESSION, true);
  15.     if ($head != null) {
  16.         curl_setopt($ch, CURLOPT_HEADER, true); // Handle the headers response
  17.         curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
  18.     }
  19.     curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1");
  20.     $exec = curl_exec($ch);
  21.     curl_close($ch);
  22.     return array($exec, explode("\\n", $exec));
  23. }
  24.  
  25. function getToken($appId, $scope, $cookie) {
  26.     if (empty($scope)) {
  27.         $scope = "";
  28.     }
  29.     $njaluk = curl("https://www.facebook.com/v2.5/dialog/oauth?response_type=token&display=popup&client_id=" . $appId . "&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer%2Fcallback&scope=" . $scope, null, array("Cookie: " . $cookie));
  30.     if (preg_match("/#access_token=(.*)/i", $njaluk[1][1], $token)) {
  31.         return explode("&", $token[1])[0];
  32.     } else {
  33.         return "Uh, oh! We have some problems."; // Check back your cookies
  34.     }
  35. }
  36.  
  37. /*
  38.     145634995501895 (bellow) is an Facebook applications ID (Graph API Explorer apps)
  39.     You can write blank in $scope variables, if have previously authorize the same applications ID
  40.     How to Get Facebook\'s Cookie (http://aingcreations-scripts.blogspot.co.id/2015/09/how-to-get-facebooks-cookie.html)
  41. */
  42.  
  43. echo getToken("145634995501895", "", "datr=...; fr=...; lu=...; s=...; csm=...; xs=...; c_user=...; act=...; p=...; presence=...; wd=...");
  44.  
  45. // You can develop this script by using COOKIEJAR on curl.
');