here u have yey
config.php
PHP Code:
<?php
$conn=mysql_connect ("SERVERIP", "BENUTZER", "PASSWORT");
?>
player_online.php
PHP Code:
<?php
require_once("config.php");
mysql_select_db("player");
$exe = mysql_query("SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play;");
$player_online = mysql_fetch_object($exe)->count;
echo "$player_online Spieler sind online"
soho, nun willst's bestimmt noch in der index eingebunden haben, dass geht so, du suchst dir 'n platz aus, wo sie eingebunden werden soll und gibst dann folgendes ein:
PHP Code:
<?php
include('player_online.php')
?>
Speichern > hochladen > F5, freuen.!