Выдай в таблице "lk"@сапсан
Как вбить в топ донатеров людей вручную?Я просто полностью перезаливал и сносил базу,а те люди кто платил хотелось бы их там отметить.
В phpmyadmin редактируй@сапсан
Как вбить в топ донатеров людей вручную?Я просто полностью перезаливал и сносил базу,а те люди кто платил хотелось бы их там отметить.
я включил curl но все равно так же
Дайте свой Discord
Все починилось только проблема появилась
<?php
/**
* WEB LK INPULSE
*
* @author SAPSAN
*
*/
namespace app\libs;
class Steam{
protected $config;
public function __construct() {
$this->config = require 'app/configs/Config.php';
}
public function PlayerInfo($steamid){
$url = file_get_contents("https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$this->config['steamKey']."&steamids=".$steamid);
$content = json_decode($url, true);
if(empty($content))return;
foreach ($content as $respone) {
foreach ($respone as $players) {
foreach ($players as $key => $val) {
$id = $val;
}
}
} return $id;
}
public function CacheUsers($steamid){
if(COUNT($steamid) == 1){
$steamid64 = $steamid[0];
}else $steamid64 = implode(',',$steamid);
$this->CreateCache($steamid64);
}
public function CreateCache($steamid){
if(!file_exists('cache'))
mkdir("cache", 0777);
$url = file_get_contents("https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$this->config['steamKey']."&steamids=".$steamid);
$content = json_decode($url, true);
if(empty($content))return;
foreach ($content as $respone) {
foreach ($respone as $players) {
foreach ($players as $key => $val) {
$id[] = $val;
$cacheFile = "cache/".$val['steamid'].".txt";
$logFileHandle = fopen($cacheFile, 'a');
fwrite($logFileHandle, $val['avatarmedium'].','.$val['personaname'].','.$val['profileurl']);
fclose($logFileHandle);
}
}
}
}
public function Steam_32($steamid64){
$pattern = "/^(7656119)([0-9]{10})$/";
if (preg_match($pattern, $steamid64, $match)) {
$const1 = 7960265728;
$const2 = "STEAM_1:";
$steam32 = '';
if ($const1 <= $match[2]) {
$a = ($match[2] - $const1) % 2;
$b = ($match[2] - $const1 - $a) / 2;
$steam32 = $const2 . $a . ':' . $b;
}
return $steam32;
}
return false;
}
public function Steam_64($steamid){
$steamid = substr($steamid, 8);
$array = explode(":", $steamid);
if(!empty($array[1])){
$steamid_64 = (((int)$array[1] * 2) + (int)$array[0]) + 76561197960265728;
return $steamid_64;
}
}
public function Avatar($steamid,$name=""){
$steam64 = $this->Steam_64($steamid);
$cacheFile = "cache/".$steam64.".txt";
if(file_exists($cacheFile)){
$handle = fopen($cacheFile, "r");
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
}
fclose($handle);
$info = explode(',', $buffer);
$return = [
'Avatar'=>$info[0],
'Name'=>$info[1],
'Profileurl'=>'href="'.$info[2].'" target="_blank"',
];
}
else{
$return = [
'Avatar' => 'pub/img/noavatar.jpg',
'Name' => $name.' (No Steam)',
'Profileurl'=> false,
];
}
return $return;
}
}
Данные от бд не правильно вписалHelp
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'left_LKWEB.lk' doesn't exist' in /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/libs/Db.php:35 Stack trace: #0 /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/libs/Db.php(35): PDOStatement->execute() #1 /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/libs/Db.php(50): app\libs\Db->query('SELECT count(au...', Array) #2 /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/libs/PlayerInfo.php(50): app\libs\Db->column('SELECT count(au...') #3 /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/include/autoload.php(39): app\libs\PlayerInfo->countPlayers() #4 /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/index.php(2): require('/mnt/iscsi/www/...') #5 {main} thrown in /mnt/iscsi/www/left/data/www/megadrop.myarena.ru/lk/app/libs/Db.php on line 35
Произошла фатальная ошибка PHP Uncaught exception 'ErrorException' with message 'No OpenID Server found at http://steamcommunity.com/openid' in /mnt/iscsi/www/scproj/data/www/scppro.ru/bans/includes/LightOpenID.php:677 Stack trace: #0 /mnt/iscsi/www/scproj/data/www/scppro.ru/bans/includes/LightOpenID.php(857): LightOpenID->discover('http://steamcom...') #1 /mnt/iscsi/www/scproj/data/www/scppro.ru/bans/includes/SteamOpenID.php(8): LightOpenID->authUrl() #2 /mnt/iscsi/www/scproj/data/www/scppro.ru/bans/steam_auth.php(34): SteamAuthorize('scppro.ru/bans') #3 {main} thrown /mnt/iscsi/www/scproj/data/www/scppro.ru/bans/includes/LightOpenID.php::677