MyBB.de Forum

Normale Version: Chatuser im Forum sichtbar?
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Kann man den Code einfach übernehmen oder muss man speziell fürs eigene Forum etwas ändern?

Alex
Du musst
PHP-Code:
$listfile = `wget -O - http://scripts.blitzed.org/chanuserlist?...dev/null`; 
auf jeden Fall ersetzten. Frag mich nicht, womit, ich kenne dieses Script nicht.
Warscheinlich wirds nicht gehen wenn ich einen anderen Server nutze: irc.quakenet.org
(22.06.2007, 02:22)Michael schrieb: [ -> ]Füge folgenden Code am Anfang der index.php nach dem <?php ein:
PHP-Code:
ob_start();
$listfile = `wget -O - http://scripts.blitzed.org/chanuserlist?...dev/null`;
$nicks split("\n"$listfile);
if(
count($nicks)>0)
{
echo 
"<label>Currently on the chat:</label>\n";
echo 
"<ul>\n";
foreach(
$nicks as $nickname)
if(
trim($nickname) != "")
echo 
"<li>" $nickname "</li>\n";
echo 
"</ul>\n";
$chatstats ob_get_contents();
ob_end_clean(); 

Danach kannst du die Variable {$chatstats} im gewünschten Template verwenden.

Hallo Michael,

kannst Du mir mal helfen ich habe diesen Code etwas abgewandelt eingebaut und bekomme folgende Fehlermeldung :

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /var/www/web277/html/index.php on line 3

Warning: include(http://www.muchmo.net/chatstats/whoisonl...fantastics) [function.include]: failed to open stream: no suitable wrapper could be found in /var/www/web277/html/index.php on line 3

Warning: include() [function.include]: Failed opening 'http://www.muchmo.net/chatstats/whoisonline.php?chan=nailfantastics' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web277/html/index.php on line 3

Ich habe es mit diesen Code versucht
PHP-Code:
ob_start();
include
'http://www.muchmo.net/chatstats/whoisonline.php?chan=nailfantastics' ;
$chatstats ob_get_contents();
ob_end_clean(); 
Du kannst keine URL includen.
(05.08.2009, 20:10)StefanT schrieb: [ -> ]Du kannst keine URL includen.


Wenn ich es so mache
PHP-Code:
ob_start();
$listfile = `wget -O - http://www.muchmo.net/chatstats/whoisonline.php?chan=nailfantastics`;
$chatstats ob_get_contents();
ob_end_clean(); 

Bekomme ich diese Meldung : Warning: shell_exec() has been disabled for security reasons in /var/www/web277/html/index.php on line 3

Was bedeutet das ????
Ok habe es jetzt hiermit hinbekommen Toungue
PHP-Code:
ob_start();
$listfile fopen("http://www.muchmo.net/chatstats/whoisonline.php?chan=nailfantastics""r");
echo 
"<p>The people currently on the chat:<p>\n";
echo 
"<ul>\n";
$nickname fgets($listfile);
while (
trim($nickname) != "") {
  echo 
"<li>" trim($nickname) . "</li>\n";
  
$nickname fgets($listfile);
}
echo 
"</ul>";
fclose($listfile);
$chatstats ob_get_contents();
ob_end_clean(); 
Seiten: 1 2