Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
The Chat Room was working 'cause I clicked on it to see what a ? was. Well it was working immediately after I logged on I should say.Nigel said:Glad to know the function was workingeven if the chat room probably wasn't
- your question was answered here.
Basically it means that the bit of code that shows the number of users couldn't connect to the chat server to find out the number of users.
I know you were dying to ask but...BeeJay said:Ah it's the code that you wrote Nigel. I see the problem now.![]()
//---------------------------------------------
// Find out how many chat users & show them
// $chatusers has number or ? if failed to connect
//---------------------------------------------
$chatusers = "";
$error_status = error_reporting();
error_reporting(E_ERROR);
$fp = fsockopen("localhost", 11100, &$errno, &$errstr, 1);
error_reporting($error_status);
if(!$fp) {
$chatusers = "";
} else {
fputs($fp,"GET /?api.UserCount HTTP/1.0\n\n");
$header = true;
$stream_read = array("timed_out" => 0);
while(!feof($fp) and !$stream_read["timed_out"]) {
$start = time();
socket_set_timeout($fp, 0,500000);
$line = fgets($fp,128);
$stream_read = (stream_get_meta_data($fp));
if ( $header == false ) $chatusers .= $line;
if ( trim($line) == "" ) $header = false;
}
fclose($fp);
}
if ($chatusers == "") {
$chatusers = "?";
}
$chatusers = trim($chatusers);
$ibforums->skin['template'] = str_replace( "<!--CHATUSERS-->" , $chatusers , $ibforums->skin['template']);