Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $token = 'f4e9227c1b7d40ed25802215220fe4b70818bba8b8f66710debbd9f1c565216f834375937b0d0c6f12d82'; // Key for group
- $data = json_decode(file_get_contents('php://input'));
- $user_id = $data->object->user_id;
- $request_params = array(
- 'message' => "Hello",
- 'user_id' => $user_id,
- 'access_token' => $token,
- 'v' => '5.0'
- );
- $get_params = http_build_query($request_params);
- file_get_contents('https://api.vk.com/method/messages.send?'.$get_params);
- echo'ok'
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement