Answer the question
In order to leave comments, you need to log in
How to get something from an array?
$people = @file_get_contents("http://api.vk.com/method/users.get?v=5.3&user_ids=1&fields=photo_200_orig"); // Отправляем запрос
$people = json_decode($people, 1);# Разбиение на массивы
Answer the question
In order to leave comments, you need to log in
$people = @file_get_contents("http://api.vk.com/method/users.get?v=5.3&user_ids=1&fields=photo_200_orig"); // Отправляем запрос
$people = json_decode($people, 1);# Разбиение на массивы
echo $people['response'][0]['first_name'];
<?
$userGet = file_get_contents("https://api.vk.com/method/users.get?fields=photo_200&uid=1");
$json_user = json_decode($userGet,1);
$uid = $json_user["response"][0]["uid"]; // ID юзера
$photo_200 = $json_user["response"][0]["photo_200"]; // Фотка юзера
$last_name = $json_user["response"][0]["first_name"].' '.$json_user["response"][0]["last_name"]; // Фамилия Имя юзера
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question