Получаю страны так:
$lang = 0; // russian
$headerOptions = array(
'https' => array(
'method' => "GET",
'header' => "Accept-language: en\r\n" .
"Cookie: remixlang=$lang\r\n"
)
);
$methodUrl = 'https://api.vk.com/method/database.getCountries?v=5.103&need_all=1&count=1000';
$streamContext = stream_context_create($headerOptions);
$json = file_get_contents($methodUrl, false, $streamContext);
print_r($json);
Но мне на выходе такая ошибка:
{"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"v","value":"5.103"},{"key":"need_all","value":"1"},{"key":"count","value":"1000"},{"key":"method","value":"database.getCountries"},{"key":"oauth","value":"1"}]}}