Documentation - GoldFreddy/vkCoverClass GitHub Wiki

Documentation

  1. Require Class

    require_once 'vkCoverClass.php';

  2. Create VK object

    $vk = new CoverVK ({GROUP_ID}, {TOKEN});

  3. Get a link for downloading the cover

    $url = $vk->getCoverUrl({CROP_X}, {CROP_Y}, {CROP_X2}, {CROP_Y2});

  4. Download the cover to the VK server

    $load = $vk->uploadPhoto($url, {PHOTO});

  5. 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}]);