@ 2017-07-09T08:35:10Z <?php
$client_id = '6091079'; // ID приложения
$client_secret = 'M6RV5zJTnWAYqepBVeMb'; // Защищённый ключ
$redirect_uri = 'https://simbrex.com/Farmose/auth.php'; // Адрес сайта
$url = 'http://oauth.vk.com/authorize';
$params = array(
'client_id' => $client_id,
'redirect_uri' => $redirect_uri,
'response_type' => 'code'
);
echo $link = '<p><a href="' . $url . '?' . urldecode(http_build_query($params)) . '"><section class="flat"><button>Анализ страницы ВК [ОСН]</button></section></a></p>';
if (isset($_GET['code'])) {
$result = false;
$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);
if (isset($token['access_token'])) {
$params = array(
'uids' => $token['user_id'],
'fields' => 'photo_50,country,city,phone,uid,status,first_name,last_name,screen_name,sex,bdate,photo_big',
'access_token' => $token['access_token']
);
$userInfo = json_decode(file_get_contents('https://api.vk.com/method/users.get' . '?' . urldecode(http_build_query($params))), true);
if (isset($userInfo['response'][0]['uid'])) {
$userInfo = $userInfo['response'][0];
$result = true;
}
}
if ($result) {
echo '<center><img src="' . $userInfo['photo_big'] . '" /></center>';
echo "</br>";
echo '<center><img src="' . $userInfo['photo_50'] . '" /></center>';
echo "</br>";
function vk_date_account_create($id)
{
if (! is_int($id))
{
$array = json_decode(file_get_contents('https://api.vk.com/method/users.get?user_ids='.$id), true);
if (! isset($array['response']))
{
return false;
}
$id = $array['response'][0]['uid'];
}
$xml = file_get_contents('http://vk.com/foaf.php?id='.$id);
preg_match('~<ya:created dc:date="([^"]+)"~i', $xml, $preg);
$exp = explode("T", $preg[1]);
$exp = $exp[0];
echo "$exp[0]";
$exp = explode("-", $exp);
$exp = "".$exp[2] .".". $exp[1] .".". $exp[0];
return $exp;
}
if ($userInfo['sex'] == 1) {
$userInfo['sex'] = "Женский";
}
elseif ($userInfo['sex'] == 2){
$userInfo['sex'] = "Мужской";
}
elseif (1 == 1) {
$userInfo['sex'] = "Не указано";
}
function isNull($id, $userInfo){
if($userInfo[$id] == 0){
$res = "Не указано";
}
else{
$res = $userInfo["$id"];
}
return $res;
}
echo $userInfo['city'];
$exp = vk_date_account_create($userInfo['uid']);
$spec = '"';
echo"<dl class=".$spec."holiday".$spec."> <dt>ID</dt> <dd>
".$userInfo['uid']."</dd>
<dt>Имя</dt> <dd> ".$userInfo['first_name']."</dd>
<dt>Ссылка</dt> <dd> ".$userInfo['screen_name']." </dd> <dt>Дата¹</dt> <dd>
".$userInfo['bdate']."</dd>
<dt>Дата²</dt> <dd>
".$exp."</dd> ";
$x = $userInfo['sex'];
echo "
<dt>Пол</dt> <dd> ".$x."</dd>
<dt>Статус</dt> <dd> ".$userInfo['statu']." </dd>";
$x = $userInfo['country'];
echo"
<dt>Страна</dt> <dd>
".$nulls."</dd> ";
$x = $userInfo['city'];
echo"
<dt>Город</dt> <dd> ". $x ."</dd>
<dt>Телефон</dt> <dd> ".$userInfo['phone']." </dd> <dt>Дата¹</dt> <dd>
".$userInfo['photo_50']."</dd>
</dl>";
}
}
$_SESSION['userInfo'] = $userInfo;
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.1.7 0.003 0.009 16.85 7.1.6 0.015 0.015 35.12 7.1.5 0.021 0.011 34.63 7.1.4 0.017 0.010 34.32 7.1.3 0.011 0.018 34.31 7.1.2 0.021 0.007 34.36 7.1.1 0.004 0.011 16.25 7.1.0 0.003 0.013 16.37 7.0.20 0.010 0.003 16.51 7.0.19 0.003 0.009 16.52 7.0.18 0.003 0.010 15.96 7.0.17 0.007 0.007 15.84 7.0.16 0.003 0.010 15.96 7.0.15 0.007 0.007 16.30 7.0.14 0.003 0.012 16.05 7.0.13 0.011 0.004 16.53 7.0.12 0.000 0.017 16.21 7.0.11 0.013 0.007 16.34 7.0.10 0.013 0.003 16.05 7.0.9 0.007 0.007 16.03 7.0.8 0.000 0.013 16.07 7.0.7 0.009 0.006 16.15 7.0.6 0.008 0.005 16.05 7.0.5 0.010 0.003 15.96 7.0.4 0.000 0.014 16.24 7.0.3 0.000 0.013 16.23 7.0.2 0.005 0.010 16.18 7.0.1 0.008 0.008 16.48 7.0.0 0.003 0.012 16.18
preferences:dark mode live preview
144.53 ms | 1394 KiB | 7 Q