PHP code example of programmis / php-ok-api-sdk
1. Go to this page and download the library: Download programmis/php-ok-api-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/ */
programmis / php-ok-api-sdk example snippets
$groupGetInfo = new \OkSdk\Group\GroupGetInfo();
$groupGetInfo->setAccessToken($token);
$groupGetInfo->setApplicationKey($app_key);
$groupGetInfo->setApplicationSecretKey($app_secret_key);
if($groupGetInfo->doRequest()){
var_dump($groupGetInfo->getGroups());
}
$photosUploadUrl = new \OkSdk\PhotosV2\PhotosV2GetUploadUrl();
if($photosUploadUrl->doRequest()){
if($photosUploadUrl->upload(['293339.jpg'])){
var_dump($photosUploadUrl->getPhotos());
}
}