I want to integrate the chat with a site. This site have a login system that take data from database and put them in a Session ....
This is my script:
- Code: Select all
$cod=mb_detect_encoding($_SESSION['username']);
require_once dirname(__FILE__)."/rt_chat/src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__);
$params["nick"] = iconv($cod, "UTF-8", $_SESSION['username']);
$params["frozen_nick"]=true;
$params["language"] = "it_IT";
//nascondiamo smiles
$params["showsmileys"]=false;
$params["btn_sh_smileys"]=false;
$chat = new phpFreeChat($params);
$chat_var['javascript']=$chat->printJavascript(true);
$chat_var['style']=$chat->printStyle(true);
$chat_var['chat']=$chat->printChat(true);
But it doesn't work!! When i login in the chat... the chat ask me to insert the nick!!! Why?? Where is the problem?? Sorry For my english. Thank you
Mike