fonclub/vk-auth

tiny lib to get vk auth cookie (remixsid) using valid mobile phone number and password

dev-master 2018-06-30 11:44 UTC

This package is auto-updated.

Last update: 2024-10-23 03:45:07 UTC


README

tiny lib to get vk auth cookie (remixsid) using valid mobile phone number and password

install via composer

composer require fonclub/vk-auth

usage

$agent = new \VkAuth\VkAuthAgent($vkCell, $vkPassword);
$remixsid = $agent->getRemixsid(); // makes few http requests to vk.com and returns valid remixsid value

// CookieJar object for usage in Guzzle Client, see [guzzle docs](http://docs.guzzlephp.org/en/latest/quickstart.html#cookies)
$jar = $agent->getAuthorizedCookieJar();

example

there is an example.php command-line script. It will print friends list of the account. To run it, you need to create a file called test_login_pass_constants.php which contains two required constants (valid vk mobile phone & password), e.g.

<?php
const TEST_VK_LOGIN = '81234567890';
const TEST_VK_PATH = 'password';

run it

php example.php