2017 © Pedro Peláez
 

library vk

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

image

s-anasol/vk

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

  • Thursday, September 29, 2016
  • by Sanasol
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 107 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

VK API Wrapper

The PHP class for vk.com API and OAuth., (*1)

Features: HTTP proxy, captcha recognition via antigate, api response timeout limit, (*2)

Use

  1. Install via composer, (*3)

    composer require s-anasol/vk
  2. Create VK object, (*4)

    1. without authorization, (*5)

      $vk = new VK\VK('{APP_ID}', '{API_SECRET}');
    2. with authorization, (*6)

      $vk = new VK\VK('{APP_ID}', '{API_SECRET}', '{ACCESS_TOKEN}');
  3. If need authorization, (*7)

    1. Get authoriz link, (*8)

      $vk->getAuthorizeURL('{API_SETTINGS}', '{CALLBACK_URL}');
    2. Get the token access by code from the authoriz link, (*9)

      $vk->getAccessToken('{CODE}');
    3. Check the status of authorization, (*10)

      $vk->isAuth(); // return bool
  4. Usage API, (*11)

    $vk->api('{METHOD_NAME}', '{PARAMETERS}');
  5. Captcha recognition, (*12)

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

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 API key to resolve captcha
  • $vk->setCaptchaSavePath("/tmp"); - set temporary captcha image save path

Variables

  • {APP_ID} — Your application's identifier.
  • {API_SECRET} — Secret application key.
  • {ACCESS_TOKEN} — Access token.
  • {API_SETTINGS} — Access rights requested 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.
  • {PARAMETERS} — Parameters of the corresponding API methods.

* If you need infinite token use key offline in {API_SETTINGS}., (*13)

License

MIT, (*14)

The Versions

29/09 2016

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky
by S-anasol

api oauth captcha vk proxy vk.com antigate

29/09 2016

v0.2.1

0.2.1.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky
by S-anasol

api oauth captcha vk proxy vk.com antigate

26/09 2016

v0.2.0

0.2.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky
by S-anasol

api oauth captcha vk proxy vk.com antigate

02/08 2015

v0.1.9

0.1.9.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky

api oauth vk vk.com

21/07 2015

v0.1.8

0.1.8.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky

api oauth vk vk.com

19/01 2014

v0.1.7

0.1.7.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky

api oauth vk vk.com

09/10 2013

v0.1.6

0.1.6.0

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

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Vlad Pronsky

api oauth vk vk.com