Documentation - GoldFreddy/vkCoverClass GitHub Wiki
Documentation
-
Require Class
require_once 'vkCoverClass.php';
-
Create VK object
$vk = new CoverVK ({GROUP_ID}, {TOKEN});
-
Get a link for downloading the cover
$url = $vk->getCoverUrl({CROP_X}, {CROP_Y}, {CROP_X2}, {CROP_Y2});
-
Download the cover to the VK server
$load = $vk->uploadPhoto($url, {PHOTO});
-
Set the cover to your group
$vk->installCover($load['hash'], $load['photo']);
Or you can use the autoInstallCover function which will automatically receive a link to load the cover, load the cover to the VK server, and install it into the group
$vk->autoInstallCover(['photo' => {PHOTO}, 'crop_x' => {CROP_X}, 'crop_y' => {CROP_Y}, 'crop_x2' => {CROP_X2}, 'crop_y2' => {CROP_Y2}]);