Answer the question
In order to leave comments, you need to log in
How to send a large request (vk api/curl)?
I use this class https://github.com/vladkens/VK
$vk = new VK\VK($this->client_id, $this->client_secret,$user["access_token"]);
$posts = $vk->api('pages.save', array(
'group_id' => $this->group_id,
'page_id' => $this->page_id,
'text' => $text,
'version' => '5.62'));
var_dump($posts);
Answer the question
In order to leave comments, you need to log in
Wangyu that these are not Kurla restrictions, but VK restrictions.
try for debugging time, in
https://github.com/vladkens/VK/blob/master/src/VK/...
change this:
private function request($url, $method = 'GET', $postfields = array())
{
curl_setopt_array($this->ch, array(
CURLOPT_USERAGENT => 'VK/1.0 (+https://github.com/vladkens/VK))',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POST => ($method == 'POST'),
CURLOPT_POSTFIELDS => $postfields,
CURLOPT_URL => $url
));
return curl_exec($this->ch);
}
private function request($url, $method = 'GET', $postfields = array())
{
curl_setopt_array($this->ch, array(
CURLOPT_USERAGENT => 'VK/1.0 (+https://github.com/vladkens/VK))',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POST => ($method == 'POST'),
CURLOPT_POSTFIELDS => $postfields,
CURLOPT_URL => $url
));
$ret = curl_exec($this->ch);
if (curl_error($this->ch)) die('CURL ERR:'.curl_error($this->ch));
return $ret;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question