{"response":{"count":234,"items":[{"id":19,"title":""},{"id":20,"title":""},{"id":5,"title":""},{"id":21,"title":""},{"id":22,"title":""},{"id":23,"title":" "},{"id":24,"title":""},{"id":25,"title":""},{"id":26,"title":""},{"id":27,"title":" "}]}}
<?php $lang = 0; // russian $headerOptions = array( 'http' => array( 'method' => "GET", 'header' => "Accept-language: en\r\n" . "Cookie: remixlang=$lang\r\n" ) ); $methodUrl = 'http://api.vk.com/method/database.getCountries?v=5.5&need_all=1&count=1000'; $streamContext = stream_context_create($headerOptions); $json = file_get_contents($methodUrl, false, $streamContext); $arr = json_decode($json, true); echo 'Total countries count: ' . $arr['response']['count'] . ' loaded: ' . count($arr['response']['items']); print_r($arr['response']['items']);
Tongue | Remixlang value |
Russian | 0 |
Ukrainian | one |
English | 3 |
Spanish | four |
Portuguese | 12 |
Deutsch | 6 |
French | sixteen |
Italian | 7 |
<?php $countryId = 1; // Russia $lang = 0; // russian $headerOptions = array( 'http' => array( 'method' => "GET", 'header' => "Accept-language: en\r\n" . // "Cookie: remixlang=$lang\r\n" ) ); $methodUrl = 'http://api.vk.com/method/database.getRegions?v=5.5&need_all=1&offset=0&count=1000&country_id=' . $countryId; $streamContext = stream_context_create($headerOptions); $json = file_get_contents($methodUrl, false, $streamContext); $arr = json_decode($json, true); echo 'Total regions count: ' . $arr['response']['count'] . ' loaded: ' . count($arr['response']['items']); print_r($arr['response']['items']);
<?php $regionId = 1045244; $countryId = 1; // Russia $lang = 0; $headerOptions = array( 'http' => array( 'method' => "GET", 'header' => "Accept-language: en\r\n" . "Cookie: remixlang=$lang\r\n" ) ); $methodUrl = 'http://api.vk.com/method/database.getCities?v=5.5&country_id=' . $countryId . '®ion_id=' . $regionId . '&offset=0&need_all=1&count=1000'; $streamContext = stream_context_create($headerOptions); $json = file_get_contents($methodUrl, false, $streamContext); $arr = json_decode($json, true); echo 'Total cities count: ' . $arr['response']['count'] . ' loaded: ' . count($arr['response']['items']); print_r($arr['response']['items']);
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
<br>
).
Updated
cookie, . uh_zuh , lang ( lang=ru).
Updated 2
, lang .
Updated 3
, :
GitHub
SQL PostgreSql
Yandex Disk
Google Drive
SQL MySql
Yandex Disk
Google Drive
CSV
- (;), , (")
Yandex Disk
Google Drive
- (,), , (")
Yandex Disk
Google Drive
: , i, , , , , , , , , , , ,
234
3 721
2 246 813
Source: https://habr.com/ru/post/204840/
All Articles