Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $key = 'cookie login fb';
- $tkn = 'token fb';
- echo '<div class="acy apm abb abt"> <b>Hello Gunakan Form Dibawah Ini Untuk Mengundang Teman Kamu Menyukai FP</b></div>
- <form method="post">
- ID FP :<br>
- <input type="text" name="id"><br>
- <input value="Invite FP" type="submit" name="add" class="btn btnC largeBtn" size="0" />
- </form>
- <hr>';
- if(isset($_POST['add'])){
- $id = $_POST['id'];
- $graph = json_decode(file_get_contents('https://graph.facebook.com/me/friends?limit=50&access_token='.$tkn), true);
- $max = count($graph[data]);
- invite($id, $max);
- }
- function invite($fb, $jum){
- global $key;
- for($i=1;$i<=2;$i++){
- $confirms=auto('https://m.facebook.com/send_page_invite/?pageid='.$fb.'&offset=1&count='.$jum, $key);
- $confir = explode('<a',$confirms);
- for($i=1;$i<= count($confir);$i++){
- $link = substr($confir[$i-1], strpos($confir[$i-1], 'href=') + 6);
- $link = substr($link, 0, strpos($link, '"'));
- if(ereg('id=',$link)){
- $link=str_replace('&','&',$link);
- if(ereg('gfid', $link)){
- $idfb = cut('ee_id=', '&page', $link);
- $cok = json_decode(file_get_contents('https://graph.facebook.com/'.$idfb.'?fields=name'),true);
- echo $cok[name].' INVITED<hr>';
- }
- }
- }
- }
- }
- function auto($url, $key){
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL,$url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($curl, CURLOPT_COOKIEFILE, $key);
- $ch = curl_exec($curl);
- curl_close($curl);
- return($ch);
- }
- function cut($start,$end,$top){
- $c =strlen($start);
- $desc= strstr("$top","$start");
- $count = strpos("$desc","$end");
- $desc = substr($desc,$c,$count-$c);
- return $desc;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement