Jump to content

[Guide]Show server stats on your website


xMrPwN

Recommended Posts

{translation from my same guide in greek section}

Ok, I don't know if this guide has been posted before but I'll make it very detailed

Let's Start

 

Supposing that we go to our web's files and we make a folder "/config" and inside we create a file "stats.php"

inside it we put the following:

<?php

   $db_user = "USER"; 
   $db_pass = "PSW"; 
   $db_name = "DATABASE"; 
   $db_serv = "HOST(ip)"; 

   $res = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]"); 
   $resdb = mysql_select_db ( "$db_name",$res ); 

   return $res; 

?>

we fill them according to our database

the infos of how to connect to the database will be in this file(all infos are secure with this form)

--------------------------------------------------------------------------------------------

afterwards, the page we want to show the infos must have on it's top:

<?php include "config/stats.php" ?>

and these:

<?php

mysql_connect($db_serv,$db_user,$db_pass) or die(mysql_error());

mysql_select_db($db_name) or die(mysql_error());

 

afterwards we write what we want from the file, to load from the database

here are some examples for:

//Total Accounts
$query = ("SELECT * FROM accounts WHERE accesslevel>=0");

$result = mysql_query($query) or die(mysql_error());

$acc2=mysql_numrows($result);

//GMs Online
$query = ("SELECT * FROM characters WHERE accesslevel=200 and online=1");

$result = mysql_query($query) or die(mysql_error());

$GM=mysql_numrows($result);

//Online Players
$query = ("SELECT * FROM characters WHERE accesslevel<=0 and online=1");

$result = mysql_query($query) or die(mysql_error());

$online=mysql_numrows($result);

//Total Characters
$query = ("SELECT * FROM characters WHERE accesslevel>=0");

$result = mysql_query($query) or die(mysql_error());

$char2=mysql_numrows($result);

//Total clans
$get_config_data="SELECT clan_id FROM clan_data";

$query = ("SELECT clan_id FROM clan_data WHERE clan_id>0");

$result = mysql_query($query) or die(mysql_error());

$clan2=mysql_numrows($result);

last lines of each code, for example: "$clan2=mysql_numrows($result);" clan2 will the name in wich everything will be written on the file, we can modify it if we want to

then we conclude connect code with:

mysql_close();

mysql_connect($db_serv,$db_user,$db_pass) or die (mysql_error());

mysql_select_db($db_name) or die(mysql_error());
?>

 

and after everything is written, to show the info, about total characters for example, on the site we write:

Total Characters: <?php print ("$char2"); ?>

(//Total characters(the script) must be in the same page in wich Total Characters: will be shown, if it's not, we simply add this on that page:

<?php include "ToFilePouTaExeis.php" ?>

 

I hope i've been helpful :)

 

PS: whoever can please take my karma back to 0 ;p

Link to comment
Share on other sites

omg... Everyone who downloads a Lineage2 website there is a Online/Offline status already...

im refering to ppl who don't use that ready stuff but have the experience to create sth themselves and need a short guide to help them ;]

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • +27833895606 Soweto Traditional Sangoma profabaraham#Kagiso|Johannesburg|Pretoria|Vanderbijlpark|Vereeniging|Brakpan|Thembisa|Krugersdorp|Merafong city|Alexandra|Refilwe|Alberton|Randfontein|Springs|Bronkhorstspruit|Randburg|Soweto|Nigel|Irene|Westonaria|Ekangala|Hammanskraal|Mamelodi|Sebokeng|Centurion|Boipatong|Thokoza|Tsakane Best Sangoma And Traditional Healer In Rivonia.Melrose arch| wendywood.Best Sangoma And Traditional Healer In Rivonia,Best Sangoma And Traditional Healer In Rivonia, Sangoma in Rivonia, Traditional Healer in Rivonia. I provide a wide range of services to both individuals and couples. Being one person, Can give my clients personalized quality service. Best Sangoma And Traditional Healer In Rivonia|Melrose Arch |Wendywood| I am the Best Traditional Herbalist from South Africa, and also a Spiritual Healer, who not only delivers on what he promises but also helps you to overcome the daily challenges that you face. I solve all with a hands-on approach and permanent solutions. Best Sangoma And Traditional Healer In Rivonia/melrose arch/ wendy wood With exceptional working Knowledge, I turn your problems into a permanent solution. You don’t even need much but just a call and get your problems solved. Why You Should Choose Me and My Practise Selection is made to receive the wisdom and knowledge of the elders. When young women/men are growing up and the shaman has  determined which one will be the next medicine woman/man in the tribe, This is how I became one of best the master spell casters that I am and why I have the experience and knowledge to create the most effective spells possible. The spells work because I use ingredients of the highest quality. With a successful history of spellcasting be sure that When a spell is cast, your challenges will be overcome https://www.powerfullmagiclovespells.com/best-sangoma-and-traditional-healer-in-rivonia/ https://www.powerfullmagiclovespells.com/best-sangoma-and-traditional-healer-in-rivonia/
    • Hello MxC! i noticed that hair style change potions  E and F on interlude are not working correct. the visual is totally missplaced or wrong. Where can i find them in patch becasue im stucked. Thanks in advance
    • +27833895606 Bring Back lost love in Day in Johannesburg|Pretoria|Vanderbijlpark|Vereeniging|Brakpan|Thembisa|Krugersdorp|Merafong city|Alexandra|Refilwe|Alberton Lost Love that Works in South Africa. Return lost love in Tradition rejuvenate your relationship & make your relationship stronger. Pretoria’s love bring back the feelings of love for ex-lovers. In case your lover left you, this love hex in Pretoria is the perfect one to solve your problems. A rupture is often due to a change of feeling inside the heart of one of the 2 lovers. Of course, love doesn’t disappear in one day, but a lower love can be the cause of a breakup. Therefore, this hex intends to restore the feelings of your ex-partner and even make them stronger. According to your situation, I will cast a ritual that will last a few days or permanently to stabilize or heal your love in Pretoria. If the breakup is recent, the work I need to do is easier than if the rupture is old. The latter case requires a strong Sangoma love in South Africa and hence will cost more in terms of work, materials, and so in terms of money. So don’t wait too long as every day that passes makes it longer to cast a hex that will work, for Lost Love in South Africa STRONG SOUTH AFRICAN LOVE RITUAL|WICCAN LOST LOVE IN SOUTH AFRICA| TRADITIONAL LOVE HEX IN S.A Table of Contents LOST LOVE IN SOUTH AFRICA TRADITIONAL LOVE RITUAL IN SOUTH AFRICA SANGOMA LOVE HEX THAT WORKS IN SA WITCHCRAFT/VOODOO  LOVE  IN SA LOVE MAGIC THAT WORKS IN SOUTH AFRICA|
    • Visit our website: https://smartaim.cc Reviews from real customers: https://smartaim.cc/index.php?/forum/8-csgo-cheats-reviews/ - Private Undetected League Cheat for Counter-Strike 2 (CS2) with major anti-cheat support: FACEIT, ESPORTAL, GAMERSCLUB, 5EWIN and many others! - Over two years on the market! More than 300 satisfied customers! Features Aimbot: Key Bone Smooth Field of View Recoil Control System (RCS) Friendly Fire Weapon Settings Triggerbot: Key Delay Hitgroup Weapon Settings ESP: Box Style Radius Bone Chams Health Weapon Sound Misc: Panic key (Hot key to disable the cheat during the game, suitable for LAN games or in case you need to disable the cheat for some reason) Auto accept (Automatic game acceptance in CS2 matchmaking) Radar (Opponents and teammates will be shown on the game radar) Stream Bypass (Ability to use a cheat during an online stream) Supported Anti-Cheats List VAC & MATCHMAKING [UNDETECTED] SMAC [UNDETECTED] CYBERSHOKE [UNDETECTED] ESPORTAL [UNDETECTED] GAMERSCLUB [UNDETECTED] FACEIT CLIENT [UNDETECTED] EASY ESPORTS [UNDETECTED] CEVO [UNDETECTED] 5EWIN / 5EPLAY / 5EARENA [UNDETECTED] B5CSGO [UNDETECTED] PERFECT WORLD PVP (PWA)完美世界WANMEI PVP (PWA)  [UNDETECTED] FASTCUP [UNDETECTED] MOSS [UNDETECTED] 99DAMAGE [UNDETECTED] CHALLENGEME.GG [UNDETECTED] AKROS [UNDETECTED]   Payment Methods: CRYPTO, PAYPAL, WECHAT, APPLEPAY and others.   In-game screenshots and video      
    • Like maxcheaters is a thing 🤣🥳🥳🥳
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock