HTML
1
Вклад в тег
"SELECT id, lan, lon, name, type, text, ( 6371 * acos( cos( radians('%s') ) * cos( radians( lan ) ) * cos( radians( lon ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lan ) ) ) ) AS distance FROM table HAVING distance < '%s' ORDER BY distance LIMIT 0, 200
$params = array(
'client_id' => $client_id,
'client_secret' => $client_secret,
'code' => $_GET['code'],
'redirect_uri' => $redirect_uri
);
$token = json_decode(file_get_contents('https://oauth.vk.com/access_token' . '?' . urldecode(http_build_query($params))), true);
$token['access_token']