Skip to content

Instantly share code, notes, and snippets.

@avtehnik
Created January 15, 2015 23:39
Show Gist options
  • Save avtehnik/818b9e0cc19017b91443 to your computer and use it in GitHub Desktop.
Save avtehnik/818b9e0cc19017b91443 to your computer and use it in GitHub Desktop.
test
<?php
require_once './vendor/autoload.php';
$auth = getjump\Vk\Auth::getInstance();
$auth->setAppId('ddddd')->setScope('SCOPE')->setSecret('dsasdads')->setRedirectUri('http://vk.loc/index.php');
$token = $auth->startCallback();
$vk = getjump\Vk\Core::getInstance()->apiVersion('5.5')->setToken($token);
$offset = 1000;
$count = 10;
while ($count){
$vk->request('wall.get', ['domain' => 'ck_live', "offset" => $offset])->each(function($i, $v) {
if(is_object($v)){
if(strpos($v->text, 'Радуць') || strpos($v->text, 'радуць')){
echo $v->date.PHP_EOL;
echo $v->text.PHP_EOL;
}
if(strpos($v->text, 'Одари') || strpos($v->text, 'одари')){
echo $v->date.PHP_EOL;
echo $v->text.PHP_EOL;
}
}
});
$offset=$offset+100;
$count--;
}
printf("<a href='%s' target='_top'>LINK</a>", $auth->getUrl());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment