PHP code example of lichi / vk-sdk
1. Go to this page and download the library: Download lichi/vk-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lichi / vk-sdk example snippets
use Lichi\Vk\Sdk\ApiProvider;
$apiProvider = new ApiProvider("VK_TOKEN");
$apiProvider->documents->downloadFromUrl("URL_DOCUMENTS", "file.jpg");
$attachment = $apiProvider->documents->upload("file.jpg", USER_ID);
$message_id = $apiProvider->messages->send(USER_ID, "Text Message", ['attachment'=>$attachment]);