Advertisement
stuppid_bot

Сами себе шлем подарки

Feb 4th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sendGift() {
  2.     var giftId = 66; // id подарка свой вписываем
  3.     var req = new XMLHttpRequest;
  4.     req.open('GET', '/al_gifts.php?act=get_gift_box&al=1&fr=0&mid=' + vk.id);
  5.     req.onload = function () {
  6.         var hash = req.response.match(/hash: '(.+?)'/)[1];
  7.         ajax.post('/al_gifts.php', {
  8.             act: 'do_send',
  9.             al: 1,
  10.             from: 'profile',
  11.             hash: hash,
  12.             mids: vk.id,
  13.             need_module: 0,
  14.             number: giftId,
  15.             text: 'Люблю себя',
  16.             type: 0
  17.         });
  18.     };
  19.     req.send();
  20. }
  21.  
  22. sendGift();
  23. setInterval(sendGift, 60 * 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement