PHP
- 7 ответов
- 0 вопросов
3
Вклад в тег
$result = json_decode(file_get_contents('https://api.vk.com/method/wall.get?'. $get_params), TRUE);
$res = $result['response']['items'];
$efficiency = [];
foreach ($res as $value) {
echo "Текст " . $value['text'] . "<br>";
echo "Комментариев " . $value['comments']['count'] . "<br>";
echo "Репосты " . $value['reposts']['count'] . "<br>";
echo "Просмотры " . $value['views']['count'] . "<br>";
echo "Лайков " . $value['likes']['count'] . "<br><br>";
$efficiency[] = (($value['likes']['count'] - $value['reposts']['count']) + ($value['reposts']['count'] * 10))/$value['views']['count'];
}