Register for your free account! | Forgot your password?

Go Back   elitepvpers › Popular Games › World of Warcraft › WoW Private Server
You last visited: Today at 10:51

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

Advertisement



[PHP] Code Sammlung

Discussion on [PHP] Code Sammlung within the WoW Private Server forum part of the World of Warcraft category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 252
Received Thanks: 44
Thumbs up [PHP] Code Sammlung

Ich wollte euch hier mal ein paar Scripte preis geben die ich erstellt habe.

Ihr könnt diese für eure Website verwenden, bearbeiten oder sonstiges.
Wenn ihr diese aber weiter verbreitet bitte mich als Ersteller vermerken.

Config
PHP Code:
<?php
$host 
= "127.0.0.1"; //MySQL Ip
$user = "root";//MYSQL Benutzer
$pass = "trinity"; //MySQL Passwort
$char_data = "characters";  //Characters Datenbank
$acc_data = "realmd"; //Account Datenbank
error_reporting(0); //Verhindert das ausgeben von Fehlern
$conn = mysql_connect($host, $user, $pass) or (mysql_error());
mysql_select_db($char_data, $conn);
?>

Spieler die online sind
PHP Code:
<?php
include('config.php');

$sql = "SELECT SUM(online) FROM characters";
$sqlquery = mysql_query($sql) or die(mysql_error());
$memb = mysql_result($sqlquery,0,0);
echo(
$memb);
mysql_close($conn);
?>
Wie viele Allianzler online sind
PHP Code:
<?php
include('config.php');

$asql = "SELECT SUM(online) FROM characters WHERE race IN(1,3,4,7,11)";
$asqlquery = mysql_query($asql) or die(mysql_error());
$amemb = mysql_result($asqlquery,0,0);
echo(
$amemb);
mysql_close($conn);
?>
Wie viele Hordler online sind
PHP Code:
<?php
include('config.php');

$hsql = "SELECT SUM(online) FROM characters WHERE race IN(2,5,6,8,10)";
$hsqlquery = mysql_query($hsql) or die(mysql_error());
$hmemb = mysql_result($hsqlquery,0,0);
echo(
$hmemb);
mysql_close($conn);
?>
Character erstellt
PHP Code:
<?php
include('config.php');

$crea = "SELECT * FROM characters";
$creat = mysql_query($crea) or die(mysql_error());
$created = mysql_num_rows($creat);
echo(
$created);
mysql_close($conn);
?>
Offene Tickets
PHP Code:
<?php
include('config.php');

$tic = "SELECT * FROM gm_tickets WHERE closed = 0";
$tick = mysql_query($tic);
$ticket = mysql_num_rows($tick);
echo(
$ticket);
mysql_close($conn);
?>
Realm Uptime (Realm ID 1)
PHP Code:
<?php
include('config.php');

mysql_select_db ($acc_data);
$uptime_query = mysql_query("SELECT * FROM uptime WHERE realmid = 1 ORDER BY starttime DESC LIMIT 1") or die(mysql_error());
$row = mysql_fetch_array($uptime_query);    
$tag = floor($row['uptime'] / 86400);
$stunde = floor($row['uptime'] / 3600) - $day * 24;
$minute = floor($row['uptime'] / 60 / 60);
$uptime_string = $tag.'T '.$stunde.'S '.$minute.'M';
mysql_close($conn);
?>
Erstelle Accounts
PHP Code:
<?php
include('config.php');

$acc = mysql_query("Select * FROM account") or die(mysql_error());
$account = mysql_num_rows($acc);
$echo($account);
mysql_close($conn);
?>
Gebannte Accounts
PHP Code:
<?php
include('config.php');

$accb = mysql_query("SELECT SUM(active) FROM account_banned WHERE active=1");
$account_banned = mysql_result($accb,0,0);
echo(
$account_banned);
mysql_close($conn);
?>
Top 20 (PvP Kills)
PHP Code:
<html>
<head>
<title>Top kills</title>
</head>
<body>
<table>
<tr>
<th width="248"><strong><font color="#FF0000" size="+1">Name</font></strong></th>
<th width="237"><strong><font color="#00FF00" size="+1">Kills</font></strong></th>
</tr>
<?php
include('config.php');

mysql_query( "SET NAMES 'utf8'" ); 


$query = mysql_query("SELECT * FROM characters ORDER BY `totalKills` DESC LIMIT 0,20");
    while(
$row=mysql_fetch_array($query)){

$name = $row['name'];
$kills = $row['totalKills'];


echo(
'
             <tr>
                 <td><center><font color="#00FFFF">'
.$name.'</font></center></td>
                 <td><center><font color="#CC6600">'
.$kills.'</font></center></td>
                
            </tr>'
);
}
mysql_close($conn);
?>
</table>
</body>
</html>
Speichert die Config unter "config.php" ab damit ihr keine Fehler bekommt.


Wenn ich noch mehr erstelle und diese Public stellen will werde ich diese hier posten.


P.S. Bei Fragen oder sonstiges einfach einen Post hier erstellen.
XoreYo is offline  
Thanks
2 Users
Old   #2
 
elite*gold: 0
Join Date: Mar 2011
Posts: 104
Received Thanks: 12
nice gibt zwar schon viele aber nicht in der form
Emragon is offline  
Old   #3
 
Loomar's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 80
Received Thanks: 36
Screens maybe ?
Loomar is offline  
Old   #4
 
elite*gold: 0
Join Date: Dec 2008
Posts: 252
Received Thanks: 44
#Push
XoreYo is offline  
Old   #5

 
Ravenstorm's Avatar
 
elite*gold: 0
The Black Market: 100/0/0
Join Date: Jan 2010
Posts: 13,150
Received Thanks: 3,206
sowas hier muss man ebenfalls NICHT pushen..

P.S. hm komisch die PHP Scripts habe ich irgendwo schonmal gesehen
kann mich auch täuschen bin ja seit 1 Jahr aus PSERVER bezirk raus
Ravenstorm is offline  
Old   #6
 
elite*gold: 0
Join Date: Dec 2008
Posts: 252
Received Thanks: 44
Quote:
Originally Posted by Ravenstorm View Post
sowas hier muss man ebenfalls NICHT pushen..

P.S. hm komisch die PHP Scripts habe ich irgendwo schonmal gesehen
kann mich auch täuschen bin ja seit 1 Jahr aus PSERVER bezirk raus
Vielleicht in einer anderen Community die hier aber leider Zensiert ist.
Dort wurde diese aber auch von mir gepostet.
XoreYo is offline  
Reply


Similar Threads Similar Threads
Waffen Code´s - Premium Code´s - Dinar Code´s [VERKAUFBAR] ! ! !
03/10/2011 - WarRock Trading - 3 Replies
Hallo Leute , ich verkaufe Code´s . Die Code´s werde ich jetzt darunter hinschreiben und ihr könnt euch bei mir melden 50 % Günstiger Als WarRock Marketplace . 1.Waffen Code´s >>> G36 Code Xm8 Code Javelin Code Mp7a1 Code Famas Retail Code G36 Retail Code
Waffen Code´s - Premium Code´s - Dinar Code´s [VERKAUFBAR] ! ! !
03/10/2011 - WarRock Trading - 9 Replies
Waffen Code´s - Premium Code´s - Dinar Code´s ! ! ! Hallo Leute , ich verkaufe Code´s . Die Code´s werde ich jetzt darunter hinschreiben und ihr könnt euch bei mir melden 50 % Günstiger Als WarRock Marketplace . 1.Waffen Code´s >>> G36 Code Xm8 Code Javelin Code
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc.
10/05/2010 - Trading - 1 Replies
Hi, wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt. Hier eine Liste der Spiele und Bonusaktionen: - (2x) War Rock - (2x) War of Titans - (2x) World of Warcraft - (1x) Warhammer Online - (1x) Bounty Bay online



All times are GMT +1. The time now is 10:51.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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