Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 14:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Frage zur Status.inc für Homepage

Discussion on Frage zur Status.inc für Homepage within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 27
Received Thanks: 0
Frage zur Status.inc für Homepage

Nabend,

kann mir jemand einmal erklären was ich schreiben muss damit die status.inc mir folgendes anzeigt:

Registrierte Accounts
Registrierte Gilden
Yang Gesamt
jonny1988 is offline  
Old 09/19/2016, 22:37   #2
 
elite*gold: 274
Join Date: Sep 2016
Posts: 101
Received Thanks: 56
Zeig uns doch mal Deine aktuelle status.inc.php - Dann erweitere ich sie Dir eben.
</nQQpls> is offline  
Old 09/20/2016, 16:46   #3
 
elite*gold: 0
Join Date: Aug 2009
Posts: 27
Received Thanks: 0
Quote:
Originally Posted by _nQQpls View Post
Zeig uns doch mal Deine aktuelle status.inc.php - Dann erweitere ich sie Dir eben.
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<?php

$serverip = "xxx.xxx.xx.xxx";
$ip = gethostbyname($serverip);
$portlist=array(15001,25001,23070,3306); // Ports
$status=array("Login Server:", "Char Server:", "World Server:", "Mysql Server:"); // Bezeichnung
$i=0;

echo '<table style="border-spacing:0px;border-collapse:inherit;"><tbody>';

foreach ($portlist as $port){

$online = @ckopen($ip, $port, $errno, $errstr, 1);
if ($online)
{
echo '<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:green;">Online</span></td></tr>';

}
else
{
echo '<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:red;">Offline</span></td></tr>';
}
@ose($online);
$i++;
}

$result1 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play"));
$result2 = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 24 HOUR) < last_play"));

echo '<tr style="height:20px;line-height:20px;"><td>Spieler online:</td><td>'.$result1['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Spieler online: (24h):</td><td>'.$result2['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Accounts Gesamt:</td><td>'.$result3['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Chars Gesamt:</td><td>'.$result4['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Gilden Gesamt:</td><td>'.$result5['count'].'</td>';
echo '<tr style="height:20px;line-height:20px;"><td>Yang Gesamt:</td><td>'.$result6['count'].'</td>';

?>



ANzeigen tut er aufgrund dessen das ich nicht weiß wie ich das abfrage nur Spieler Online und Spieler Online letzte 24h

Ich hab unter Accounts gesamt schon versucht die Tabelle Accounts.Accounts aus zu lesen aber leider erfolglos.
jonny1988 is offline  
Old 09/20/2016, 19:47   #4
 
elite*gold: 274
Join Date: Sep 2016
Posts: 101
Received Thanks: 56
Bin am Handy und werde es Dir deshalb nicht einrücken oder gar aufräumen, aber hier:

PHP Code:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<?php

$serverip 
"xxx.xxx.xx.xxx";
$ip gethostbyname($serverip);
$portlist=array(15001,25001,23070,3306); // Ports
$status=array("Login Server:""Char Server:""World Server:""Mysql Server:"); // Bezeichnung
$i=0;

echo 
'<table style="border-spacing:0px;border-collapse:inherit;"><tbody>';

foreach (
$portlist as $port){

$online = [MENTION=4006698]fso[/MENTION]ckopen($ip$port$errno$errstr1);
if (
$online)
{
echo 
'<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:green;">Online</span></td></tr>';

}
else
{
echo 
'<tr style="height:20px;line-height:20px;"><td>'.$status[$i].'</td><td><span style="color:red;">Offline</span></td></tr>';
}  [
MENTION=1573946]fcl[/MENTION]ose($online);
$i++;
}

$result1 mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play"));
$result2 mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player WHERE DATE_SUB(NOW(), INTERVAL 24 HOUR) < last_play"));
$result3 mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM account.account"));
$result4 mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.player"));
$result5 mysql_fetch_assoc(mysql_query("SELECT COUNT(id) AS count FROM player.guild"));
$result6 mysql_fetch_assoc(mysql_query("SELECT SUM(gold) AS count FROM player.player"));

echo 
'<tr style="height:20px;line-height:20px;"><td>Spieler online:</td><td>'.$result1['count'].'</td>';
echo 
'<tr style="height:20px;line-height:20px;"><td>Spieler online: (24h):</td><td>'.$result2['count'].'</td>';
echo 
'<tr style="height:20px;line-height:20px;"><td>Accounts Gesamt:</td><td>'.$result3['count'].'</td>';
echo 
'<tr style="height:20px;line-height:20px;"><td>Chars Gesamt:</td><td>'.$result4['count'].'</td>';
echo 
'<tr style="height:20px;line-height:20px;"><td>Gilden Gesamt:</td><td>'.$result5['count'].'</td>';
echo 
'<tr style="height:20px;line-height:20px;"><td>Yang Gesamt:</td><td>'.$result6['count'].'</td>';

?>
Und nutze bitte nächstes mal die passendes Tags, damit man es wenigstens ordentlich auslesen oder kopieren kann :-)
</nQQpls> is offline  
Thanks
2 Users
Old 09/21/2016, 00:43   #5
 
elite*gold: 0
Join Date: Aug 2009
Posts: 27
Received Thanks: 0
Oooj sry, ja schreibe vom Handy da sieht man das nicht immer, aber THX Klappt wunderbar
jonny1988 is offline  
Reply


Similar Threads Similar Threads
Homepage - Status.inc.php error
06/05/2015 - Metin2 Private Server - 5 Replies
Hello guys, i made a new server and now i translate and fix my homepage script. But i have in the folder 'inc' a file with name 'status.inc.php' . I put the right ip and right ports there but when i put to my website it continues to show me 'Offline'. Can you help me?
Metin2 Homepage Status problem
02/13/2014 - Metin2 Private Server - 5 Replies
Weiß nicht mehr weiter <img style="margin-top:15px;" id="loading" src="./img/loading.gif"/> <div class="online-status" style="font-size:12px;"> <div id="status_pos"> <?php $ip = gethostbyname($serverSettings); $portlist=array(3306,11002,13001,13002); // Ports $status=array("Mysql Server:", "Login Server:", "Channel1:", "Channel2:"); // Bezeichnung $i=0;
Homepage Problem - Status (Ports)
12/15/2012 - Metin2 Private Server - 2 Replies
Joa also hab mir diese Homepage hier: http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/1985657-release-metin2-homepage-de sign-script-blue-gold-silver.html auf nen Webspace von one.com gepackt. MySQL geht etc, also kann auf der Homepage mich anmelden zum Server, aber oben der Status will irgendwie nicht, und mit dem kack kenn ich mich da auch nicht so aus. Nunja die status.inc.php sieht so aus (jedenfalls der Teil für den Status des Servers oben) $ip =...
problem bei homepage! status.inc.php
11/28/2012 - Metin2 Private Server - 4 Replies
habe bei dieser homepage http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/2087132-release-metin2-homepage-i nc-script.html die status.inc.php angepasst mit server ip ports alles..aber es wird die ganze zeit off angezeigt login server char server etc immer offline obwohl der server online ist <?php $ip = gethostbyname($serverSettings);
Online status @ werdernator Homepage
07/11/2010 - Metin2 Private Server - 6 Replies
Hallo com, gestern hat werdernator sein HP script pub gemacht , hab auch alles geändert alles funktioniert auch perfekt nur der online status will nich funkzen , mein server ist auch on und kann mich auch einloggen und bei dbsettings hab ich auch alles richtig hier mal der code , könnt mir sagen was ich vergessen hab^^ <?PHP include 'dbsettings.php'; $ip = gethostbyname ($serverip); $portlist=array(3306 ,11002, 13000, 13003); $onliner=array("<p class=\"serverStats\">MySql Server", "<p...



All times are GMT +1. The time now is 14:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.