Advertisement
Guest User

Untitled

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