承接 s-anasol/vk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

s-anasol/vk

Composer 安装命令:

composer require s-anasol/vk

包简介

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

README 文档

README

The PHP class for vk.com API and OAuth.

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

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

  • $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}.

License

MIT

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 86
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固