Code: Alles auswählen
<?php
require("api.php");
$server = X;
$cid = "DeinChat";
$admin = "BrauseJunior";
$sid = "88ABCDEFGHIJKLM";
$chat = new Webkicks($cid, $server, $admin, "", $sid);
list($hadmin,$admins,$mods)=$chat->getTeam();
$users=$chat->getAllUsers();
$online=$chat->getOnlineUsers();
$onlineAdmins=$onlineMods=$onlineUsers=$onlineGuests=array();
foreach($online as $o){
if(in_array($o, $hadmin) || in_array($o, $admins))$onlineAdmins[]=$o;
elseif(in_array($o, $mods))$onlineMods[]=$o;
elseif(in_array($o, $users))$onlineUsers[]=$o;
else $onlineGuests[]=$o;
}
if(count($onlineGuests))echo "<h3>Gäste</h3><p>".implode("<br>",$onlineGuests)."</p>";
if(count($onlineUsers))echo "<h3>User</h3><p>".implode("<br>",$onlineUsers)."</p>";
if(count($onlineMods))echo "<h3>Mods</h3><p>".implode("<br>",$onlineMods)."</p>";
if(count($onlineAdmins))echo "<h3>Admins</h3><p>".implode("<br>",$onlineAdmins)."</p>";
if(!count($online)) echo "<p>Derzeit ist niemand im Chat $cid eingeloggt.</p>";
?>
Code: Alles auswählen
<?php
require("api.php");
$server = X;
$cid = "DeinChat";
$admin = "BrauseJunior";
$sid = "88ABCDEFGHIJKLM";
$chat = new Webkicks($cid, $server, $admin, "", $sid);
list($hadmin,$admins,$mods)=$chat->getTeam();
$users=$chat->getAllUsers();
$online=$chat->getOnlineUsers();
$onlineAdmins=$onlineMods=$onlineUsers=$onlineGuests=array();
foreach($online as $o){
if(in_array($o, $hadmin) || in_array($o, $admins))$onlineAdmins[]=$o;
elseif(in_array($o, $mods))$onlineMods[]=$o;
elseif(in_array($o, $users))$onlineUsers[]=$o;
else $onlineGuests[]=$o;
}
echo "<h3>Gäste</h3><p>".implode("<br>",$onlineGuests)."</p>";
echo "<h3>User</h3><p>".implode("<br>",$onlineUsers)."</p>";
echo "<h3>Mods</h3><p>".implode("<br>",$onlineMods)."</p>";
echo "<h3>Admins</h3><p>".implode("<br>",$onlineAdmins)."</p>";
?>
Entweder über wktools (bei Passwort-Tools) oder direkt im Chat. Sieht man z.B. beim MouseOver über den SE-Link (die Zeichenfolge nach dem Nicknamen).Brause-Junior hat geschrieben:Woher bekomme ich die SID?
Code: Alles auswählen
siehe unten
Code: Alles auswählen
<?php
require("api.php");
$server = X;
$cid = "DeinChat";
$admin = "BrauseJunior";
$sid = "88ABCDEFGHIJKLM";
$chat = new Webkicks($cid, $server, $admin, "", $sid);
$pfeil="<img src='http://deineDomain.de/pfeil.gif'> ";
list($hadmin,$admins,$mods)=$chat->getTeam();
$users=$chat->getAllUsers();
$online=$chat->getOnlineUsers();
sort($online);
$onlineTeam=$onlineUsers=$onlineGuests=array();
$userIcons=array(
"BrauseJunior"=>"http://deineDomain.de/deinBild.gif",
"andererNick"=>"http://deineDomain.de/deinBild.gif",
"nocheinNick"=>"http://deineDomain.de/deinBild.gif",
"Nick3"=>"http://deineDomain.de/deinBild.gif",
"Nick4"=>"http://deineDomain.de/deinBild.gif",
"Nick5"=>"http://deineDomain.de/deinBild.gif",
"Nick6"=>"http://deineDomain.de/deinBild.gif"
);
foreach($online as $o){
$o2=$pfeil.$o;
if(array_key_exists($o, $userIcons))$o2.=" <img src='".$userIcons[$o]."'>";
if(in_array($o, $hadmin) || in_array($o, $admins)||in_array($o, $mods))$onlineTeam[]=$o2;
elseif(in_array($o, $users))$onlineUsers[]=$o2;
else $onlineGuests[]=$o2;
}
echo "<br>Besucher<br>".implode("<br>",$onlineGuests);
echo "<br>Mitglieder<br>".implode("<br>",$onlineUsers);
echo "<br>Team<br>".implode("<br>",$onlineTeam);
?>
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast