PHPackages                             s-anasol/vk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. s-anasol/vk

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

s-anasol/vk
===========

The PHP class for vk.com API. With HTTP proxy and captcha recognition via antigate support

v0.2.1(9y ago)120MITPHPPHP &gt;=5.3.0

Since Oct 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/S-anasol/VK)[ Packagist](https://packagist.org/packages/s-anasol/vk)[ RSS](/packages/s-anasol-vk/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)DependenciesVersions (7)Used By (0)

VK API Wrapper
==============

[](#vk-api-wrapper)

The PHP class for vk.com API and OAuth.

Features: HTTP proxy, captcha recognition via antigate, api response timeout limit

### Use

[](#use)

1. Install via composer

    ```
     composer require s-anasol/vk

    ```
2. Create VK object

    1. without authorization

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}');

        ```
    2. with authorization

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}', '{ACCESS_TOKEN}');

        ```
3. If need authorization

    1. Get authoriz link

        ```
         $vk->getAuthorizeURL('{API_SETTINGS}', '{CALLBACK_URL}');

        ```
    2. Get the token access by code from the authoriz link

        ```
         $vk->getAccessToken('{CODE}');

        ```
    3. Check the status of authorization

        ```
         $vk->isAuth(); // return bool

        ```
4. Usage API

    ```
     $vk->api('{METHOD_NAME}', '{PARAMETERS}');

    ```
5. Captcha recognition

```
$vk->setAntigate('antigate-key');
$vk->setCaptchaSavePath('./captcha'); // YOU MUST create 'captcha' folder at project root path

```

### Class methods

[](#class-methods)

- `$vk->setApiVersion({NUBMER});` - set api version
- `$vk->setProxy("1.2.3.4:8080");` - set HTTP proxy for API requests
- `$vk->setTimeout(10);` - set API Response timeout
- `$vk->setAntigate("antigate-key");` - set [antigate](http://antigate.com/) API key to resolve captcha
- `$vk->setCaptchaSavePath("/tmp");` - set temporary captcha image save path

### Variables

[](#variables)

- `{APP_ID}` — Your application's identifier.
- `{API_SECRET}` — Secret application key.
- `{ACCESS_TOKEN}` — Access token.
- `{API_SETTINGS}` — Access [rights requested](http://vk.com/developers.php?oid=-17680044&p=Application_Access_Rights) by your app (through comma).
- `{CALLBACK_URL}` — Address to which `{CODE}` will be rendered.
- `{CODE}` — The code to get access token.
- `{METHOD_NAME}` — Name of the API method. [All methods.](http://vk.com/developers.php?oid=-17680044&p=API_Method_Description)
- `{PARAMETERS}` — Parameters of the corresponding API methods.

\* If you need infinite token use key `offline` in `{API_SETTINGS}`.

### License

[](#license)

[MIT](https://raw.github.com/vladkens/VK/master/LICENSE)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~217 days

Recently: every ~246 days

Total

6

Last Release

3561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50266bc29d70d76d79d80b5203f0dd1abef41b4632f50220c9b976a2a5e28190?d=identicon)[Sanasol](/maintainers/Sanasol)

---

Top Contributors

[![sanasol](https://avatars.githubusercontent.com/u/1709666?v=4)](https://github.com/sanasol "sanasol (6 commits)")[![corpsee](https://avatars.githubusercontent.com/u/1416706?v=4)](https://github.com/corpsee "corpsee (4 commits)")[![chmac](https://avatars.githubusercontent.com/u/690997?v=4)](https://github.com/chmac "chmac (1 commits)")[![exileed](https://avatars.githubusercontent.com/u/942898?v=4)](https://github.com/exileed "exileed (1 commits)")[![Paaashka](https://avatars.githubusercontent.com/u/250312?v=4)](https://github.com/Paaashka "Paaashka (1 commits)")[![Tantacula](https://avatars.githubusercontent.com/u/1346989?v=4)](https://github.com/Tantacula "Tantacula (1 commits)")

---

Tags

apiproxyoauthcaptchavkvk.comantigate

### Embed Badge

![Health badge](/badges/s-anasol-vk/health.svg)

```
[![Health](https://phpackages.com/badges/s-anasol-vk/health.svg)](https://phpackages.com/packages/s-anasol-vk)
```

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.7k143.0M274](/packages/league-oauth2-server)[vladkens/vk

The PHP class for vk.com API with support OAuth.

213115.5k5](/packages/vladkens-vk)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40921.3M85](/packages/auth0-auth0-php)[bocharsky-bw/vkontakte-php-sdk

Vkontakte PHP SDK

3259.5k1](/packages/bocharsky-bw-vkontakte-php-sdk)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

261.8M1](/packages/mollie-oauth2-mollie-php)[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

924.2k3](/packages/digitalstars-simplevk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
