Advertisement
janter13

function out grup fb

Oct 28th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?php
  2.  
  3. function auto($id, $fb_dtsg, $log){
  4. $data = array(
  5. 'fb_dtsg' => $fb_dtsg,
  6. 'charset_test' => '€,´,€,´,水,Д,Є',
  7. 'group_id' => $id,
  8. 'prevent_readd' => '',
  9. 'confirm' => 'Konfirmasi',
  10. );
  11.  
  12. $fields = '';
  13. foreach($data as $key => $value){
  14. $fields .= $key . '=' . $value . '&';
  15. }
  16. rtrim($fields, '&');
  17. $post = curl_init();
  18. curl_setopt($post, CURLOPT_URL, 'https://m.facebook.com/a/group/leave/');
  19. curl_setopt($post, CURLOPT_POST, count($data));
  20. curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
  21. curl_setopt($post,
  22. CURLOPT_RETURNTRANSFER, 1);
  23. curl_setopt($post,
  24. CURLOPT_FOLLOWLOCATION, 1);
  25. curl_setopt($post,
  26. CURLOPT_HEADER, 0);
  27. curl_setopt($post,
  28. CURLOPT_NOBODY, 0);
  29. curl_setopt($post,CURLOPT_COOKIEJAR, $log);
  30. curl_setopt($post,CURLOPT_COOKIEFILE, $log);
  31. $result = curl_exec($post);
  32. curl_close($post);
  33. return $result;
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement