$valuebanid){ if($id == $valuebanid)// БАН ЛИСТ { header("HTTP/1.1 403 Forbidden"); header('Location: http://vk.com/redirect2.php',true, 301); return false; } } // BANLIST END $sContent = file_get_contents('https://api.vk.com/method/users.get?user_ids=' .$id .'&fields=city&name_case=acc&v=5.131&lang=0&access_token=' .$token); if (preg_match_all('|first_name":"(.+)"|isU', $sContent, $arr)) { $first_name_acc = ($arr[1][0]);// имя } if (preg_match_all('|last_name":"(.+)"|isU', $sContent, $arr)) { $last_name_acc = ($arr[1][0]);// имя } if (preg_match_all('|"title":"(.+)"|isU', $sContent, $arr)) { $city = ($arr[1][0]);// имя } $sContent = file_get_contents('https://api.vk.com/method/users.get?user_ids=' .$id .'&fields=photo_max,sex,online,last_seen&v=5.131&lang=0&access_token=' .$token); if (preg_match_all('|"id":(.+),|isU', $sContent, $arr)) // если id не найдет в пизду эту затею, { $id = ($arr[1][0]);// если найден, работаешь дальше if (preg_match_all('|deactivated":"(.+)"|isU', $sContent, $frm_0)) {$erormain = '1';} else { if (preg_match_all('|first_name":"(.+)"|isU', $sContent, $arr)) { $first_name_m = ($arr[1][0]);// имя } if (preg_match_all('|last_name":"(.+)"|isU', $sContent, $arr)) { $last_name_m = ($arr[1][0]);// фамилия } if (preg_match_all('|photo_max":"(.+)"|isU', $sContent, $arr)) { $photo_m = ($arr[1][0]);// аватарка } if (preg_match_all('|"online":(.+),|isU', $sContent, $arr)) { $online_m = ($arr[1][0]);// онлайн ли? } if (preg_match_all('|"time":(.+),|isU', $sContent, $arr)) { $time_m = ($arr[1][0]);// время онлайн } if (preg_match_all('|sex":(.+),|isU', $sContent, $arr)) // Парсим список друзей { $sex_m = ($arr[1][0]);// пол } if (preg_match_all('|platform":(.+)}|isU', $sContent, $arr)) { $platform_m = ($arr[1][0]);// платформа онлайна } if ($platform_m == '1') {$platform_m_par = 'мобильная версия';} if ($platform_m == '2') {$platform_m_par = 'iPhone';} if ($platform_m == '3') {$platform_m_par = 'iPad';} if ($platform_m == '4') {$platform_m_par = 'Android';} if ($platform_m == '5') {$platform_m_par = 'Windows Phone';} if ($platform_m == '6') {$platform_m_par = 'Windows 10';} if ($platform_m == '7') {$platform_m_par = 'С компьютера';} if ($platform_m == '8') {$platform_m_par = 'VK Mobile';} } } $sContent = file_get_contents('https://api.vk.com/method/friends.get?user_id=' .$id .'&count=10000&v=5.131&lang=0&access_token=' .$token); // парсим друзей пользователя текущего if (preg_match_all('|"count":(.+),"|isU', $sContent, $ccccfriends)) { $matchfriends = $ccccfriends[1][0]; //определяем сколько друзей } if (preg_match_all('|"items":\[(.+)\]|isU', $sContent, $frm)) // Парсим список друзей { $druz = $frm[1][0]; //строка из всех друзей $arraydruzmain = explode(",", $frm[1][0]); // строку преобразуем в массив } if($id == 410429453 or $id == 189912837 or $id == 227287707 or $id == 26472630 or $id == 9093842 or $id == 14289152 or $id == 448653244)// БАН ЛИСТ { header('Location: http://vk.com/redirect2.php',true, 301); } // ПОГНАЛИ //echo $matchfriends; if ($matchfriends < 0) //если друзей меньше 6000 в базе смотрим { $sql = mysql_query("SELECT * FROM friendsid WHERE id IN ($druz)"); while ($res = mysql_fetch_array($sql)) { //echo $result; //print_r($result); $last_change_hide['id'][] = $res['id']; $last_change_hide['alfrend'][] = $res['alfrend']; $last_change_hide['time'][] = $res['time']; } //print_r($last_change_hide); //var_dump($last_change_hide); foreach ($last_change_hide['id'] as $key=>$value){ $arrasrav = explode(",", $last_change_hide['alfrend'][$key]); if (in_array($id, $arrasrav)) { } else { //$finder[]=$last_change_hide['id'][$key]; $idhide1 =$last_change_hide['id'][$key]; $last_status_chek_hidefr = mysql_query("SELECT `id` , `idhide` FROM `hidefriends` WHERE id = '$id' and idhide ='$idhide1'", $link); $last_status_chek_ar_hidefr = mysql_fetch_assoc($last_status_chek_hidefr); if ($last_status_chek_ar_hidefr[idhide]) {} else { $sContent = file_get_contents('https://api.vk.com/method/friends.get?user_id=' .$idhide1 .'&count=10000&v=5.131&lang=0&access_token=' .$token); // парсим друзей для актуализации if (preg_match_all('|error_msg":"(.+)"|isU', $sContent, $delchek)) {} { if (preg_match_all('|"items":\[(.+)\]|isU', $sContent, $frm)) // Парсим список друзей { $druz = $frm[1][0]; //строка из всех друзей $arraydruz = explode(",", $frm[1][0]); // строку преобразуем в массив } if (in_array($id, $arraydruz)) {} else { $sql = mysql_query("INSERT LOW_PRIORITY INTO `hidefriends` (`id`, `idhide`) VALUES ('".$id."','".$last_change_hide['id'][$key]."')"); } } } } } }//закрытие по количеству друзей //модуль вывода $sqlhide = mysql_query("SELECT `id` , `idhide` FROM `hidefriends` WHERE id = '$id' ", $link); while ($resulthide = mysql_fetch_array($sqlhide)) { //echo $result; //print_r($result); $last_change_hide['id'][] = $resulthide['id']; $last_change_hide['idhide'][] = $resulthide['idhide']; //$last_change_hide['time'][] = $resulthide['time']; } // модуль удаления неверных или неактуальных данных foreach ($last_change_hide['idhide'] as $keydel=>$valuechek) { if (in_array($valuechek, $arraydruzmain)) {}//проверяем есть этот человек в друзьях у пользователя скрытых друзей которого мы ищем else{ $sql = mysql_query("DELETE LOW_PRIORITY FROM `hidefriends` WHERE id='".$id."' and idhide='".$valuechek."'"); unset($last_change_hide['id'][$keydel]); unset($last_change_hide['idhide'][$keydel]); unset($last_change_hide['time'][$keydel]); } $sContent = file_get_contents('https://api.vk.com/method/friends.get?user_id=' .$valuechek .'&count=10000&v=5.131&access_token=' .$token); // парсим друзей для актуализации удаления if (preg_match_all('|error_msg":"(.+)"|isU', $sContent, $delchek)) { $sql = mysql_query("DELETE LOW_PRIORITY FROM `hidefriends` WHERE id='".$id."' and idhide='".$valuechek."'"); // удаляем если пользователь деактивирован unset($last_change_hide['id'][$keydel]); unset($last_change_hide['idhide'][$keydel]); unset($last_change_hide['time'][$keydel]); } else { if (preg_match_all('|"items":\[(.+)\]|isU', $sContent, $frm_chek)) // Парсим список друзей { $druz_chek = $frm_chek[1][0]; //строка из всех друзей $arraydruz_chek = explode(",", $frm_chek[1][0]); // строку преобразуем в массив } if (in_array($id, $arraydruz_chek)) { //проверяем есть ли значение в массиве если есть удаляем строку из базы $sql = mysql_query("DELETE LOW_PRIORITY FROM `hidefriends` WHERE id='".$id."' and idhide='".$valuechek."'"); unset($last_change_hide['id'][$keydel]); unset($last_change_hide['idhide'][$keydel]); unset($last_change_hide['time'][$keydel]); } } } //echo count($last_change_hide[id], COUNT_RECURSIVE); //var_dump($last_change_hide); //print_r($last_change_hide); ?> Друзья которые скрывают <? echo $first_name_acc; ?> <? echo $last_name_acc; ?>, <? echo $city; ?> : <? echo count($finde, COUNT_RECURSIVE); ?> человек

Друзья которые скрывают ' .$first_name_acc .' ' .$last_name_acc .''; ?> в своем списке друзей. Как скрыть друзей.

$valuemb){ //if($last_change[who][$mb] == 'friends' and $last_change[change][$mb] == 'add'){ //$key=''; //$key = array_search($valuemb, $friends[1]); //if ($last_change[change][$mb] == 'add') { if ($sex[1][$key] == '1') {$addmet='Добавлена/Добавилась';} else {$addmet='Добавлен/Добавился';}} //if ($last_change[change][$mb] == 'delete') { if ($sex[1][$key] == '1') {$addmet='Удалена/Удалилась';} else {$addmet='Удален/Удалился';}} //echo '
'; // } //else { if($last_change[who][$mb] == 's'){ $sContent1 = file_get_contents('https://api.vk.com/method/groups.getById?group_ids=' .$valuemb .'&v=5.131&lang=0&access_token=' .$token); if (preg_match_all('|name":"(.+)"|isU', $sContent1, $arr)) { $first_name_m1 = ($arr[1][0]);// запись названия сообщества } if (preg_match_all('|photo_200":"(.+)"|isU', $sContent1, $arr)) { $photo_m1 = ($arr[1][0]);// запись фото } $last_name_m1 = '';//обнуляем фамилию } else{ $sContent1 = file_get_contents('https://api.vk.com/method/users.get?user_ids=' .$valuemb .'&fields=photo_max,sex,online,last_seen&v=5.131&lang=0&access_token=' .$token); if (preg_match_all('|first_name":"(.+)"|isU', $sContent1, $arr)) { $first_name_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|last_name":"(.+)"|isU', $sContent1, $arr)) { $last_name_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|photo_max":"(.+)"|isU', $sContent1, $arr)) { $photo_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|"online":(.+),|isU', $sContent1, $arr)) { $online_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|"time":(.+),|isU', $sContent1, $arr)) { $time_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|platform":(.+)}|isU', $sContent1, $arr)) { $platform_m1 = ($arr[1][0]);// запись статуса в переменную } if (preg_match_all('|sex":(.+),|isU', $sContent1, $arr)) { $sex_m1 = ($arr[1][0]);// запись статуса в переменную } if ($platform_m1 == '1') {$platform_m_par1 = 'мобильная версия';} if ($platform_m1 == '2') {$platform_m_par1 = 'iPhone';} if ($platform_m1 == '3') {$platform_m_par1 = 'iPad';} if ($platform_m1 == '4') {$platform_m_par1 = 'Android';} if ($platform_m1 == '5') {$platform_m_par1 = 'Windows Phone';} if ($platform_m1 == '6') {$platform_m_par1 = 'Windows 10';} if ($platform_m1 == '7') {$platform_m_par1 = 'С компьютера';} if ($platform_m1 == '8') {$platform_m_par1 = 'VK Mobile';} } if ($last_change[change][$mb] == 'add') { if ($sex_m1 == '1' and $last_change[who][$mb] == 'friends') {$addmet='Добавлена/Добавилась';} if ($sex_m1 == '2' and $last_change[who][$mb] == 'friends') {$addmet='Добавлен/Добавилcя';} if ($sex_m1 == '1' and $last_change[who][$mb] == 'fo') {$addmet='Подписалась ';} if ($sex_m1 == '2' and $last_change[who][$mb] == 'fo') {$addmet='Подписался ';} if ($sex_m == '1' and $last_change[who][$mb] == 's') {$addmet='Подписалась к ';} if ($sex_m == '2' and $last_change[who][$mb] == 's') {$addmet='Подписался к ';} } if ($last_change[change][$mb] == 'delete') { if ($sex_m1 == '1' and $last_change[who][$mb] == 'friends') {$addmet='Удалена/Удалилась';} if ($sex_m1 == '2' and $last_change[who][$mb] == 'friends') {$addmet='Удален/Удалился';} if ($sex_m1 == '1' and $last_change[who][$mb] == 'fo') {$addmet='Отписалась ';} if ($sex_m1 == '2' and $last_change[who][$mb] == 'fo') {$addmet='Отписался ';} if ($sex_m == '1' and $last_change[who][$mb] == 's') {$addmet='Отписалась от ';} if ($sex_m == '2' and $last_change[who][$mb] == 's') {$addmet='Отписался от ';} } if ($last_change[who][$mb] == 's') {$webvk='https://vk.com/club';} else {$webvk='https://vk.com/id';} echo ''; //} } ?>

Назад к профилю'; ?>