Last active
July 5, 2017 03:32
-
-
Save ammarfaizi2/41e49d7e7e9abc2c9958a9585faecc77 to your computer and use it in GitHub Desktop.
AAA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class q | |
{ | |
public function __invoke() | |
{ | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AAA</title> | |
</head> | |
<body> | |
<h2>token.txt</h2> | |
<?php | |
echo "<pre>"; | |
if (file_exists("token.txt")) { | |
$a = explode("\n", file_get_contents("token.txt")); | |
foreach ($a as $val) { | |
echo substr($val, 0, 10). "... = ".$this->show_info(trim($val))."\n\n"; | |
flush(); | |
} | |
} else { | |
print "File token.txt tidak ada"; | |
} | |
echo "</pre>"; | |
?> | |
</body> | |
</html> | |
<?php | |
} | |
private function show_info($a) | |
{ | |
$ch = curl_init("https://graph.facebook.com/me/friends/100000188221616"); | |
curl_setopt_array($ch, array( | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_SSL_VERIFYPEER => false, | |
CURLOPT_SSL_VERIFYHOST => false, | |
CURLOPT_POST=>true, | |
CURLOPT_POSTFIELDS=>array("method"=>"post", "access_token"=>trim($a)) | |
)); | |
$aa = curl_exec($ch); | |
curl_close($ch); | |
return json_encode(json_decode($aa)); | |
} | |
} | |
$a = new q(); | |
$a(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment