Skip to content

Instantly share code, notes, and snippets.

@sergej-brazdeikis
Created May 20, 2012 02:46
Show Gist options
  • Save sergej-brazdeikis/2736092 to your computer and use it in GitHub Desktop.
Save sergej-brazdeikis/2736092 to your computer and use it in GitHub Desktop.
vk.com video construct
<?php
function __construct($login, $password, $phoneLast4Digits)
{
$this->$phoneLast4Digits = $phoneLast4Digits;
$this->gb = new Grabber();
$data = $this->gb->post('http://login.vk.com/?act=login',
array(
'act' => 'login',
'q' => '',
'al_frame' => '1',
'expire' => '',
'captcha_sid' => '',
'captcha_key' => '',
'from_host' => 'vkontakte.ru',
'email' => $login,
'pass' => $password
));
$sid = substr($data, strpos($data, "setCookieEx('sid', '") + 20, 60);
$this->gb->setCookie('remixsid=' . $sid);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment