Advertisement
Guest User

Untitled

a guest
Jun 7th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="lidertvru_bot";
  4. $pass="romich0305";
  5. $db_name="lidertvru_bot";
  6. $link=mysql_connect($host,$user,$pass);
  7. mysql_select_db($db_name,$link);
  8.  
  9. $query = mysql_query ("SELECT id
  10. FROM livekharkov ");
  11. $myrow_query = mysql_fetch_array ($query);
  12.  
  13. while ($myrow_query['id']):
  14. //Токен сообщества
  15. $token = '7d8aad285478e800ed4a094161cc4f96f8be92e3403f725c9db281da7ab48ee12fa6d864d45c390be90ef';
  16.  
  17. $request_params = array(
  18. 'message' => "Тестовая рассылка лол",
  19. 'user_id' => .$query['id'].,
  20. 'access_token' => $token,
  21. 'v' => '5.0'
  22. );
  23.  
  24. $get_params = http_build_query($request_params);
  25.  
  26. file_get_contents('https://api.vk.com/method/messages.send?'. $get_params);
  27.  
  28. echo file_get_contents('https://api.vk.com/method/messages.send?'. $get_params);
  29.  
  30. endwhile;
  31.  
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement