/home/cassie/public_html/news/demo/demo2_simple_with_params.php
<?php
require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
$params = array();
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["title"] = "A simple chat with user's parameters";
$params["nick"] = "guest"; // setup the intitial nickname
$params["prefix"] = "myprefix_";
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["shownotice"] = 0; // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
$params["max_nick_len"] = 20; // nickname length could not be longer than 10 caracteres
$params["max_text_len"] = 300; // a message cannot be longer than 50 caracteres
$params["refresh_delay"] = 10000; // chat refresh speed is 10 secondes (10000ms)
$params["max_msg"] = 15; // max message in the history is 15 (message seen when reloading the chat)
$params["height"] = "230px"; // height of chat area is 230px
// do not uses width parameter because of a display bug in IE6
//$params["width"] = "800px"; // width of chat area is 800px
$params["debug"] = true; // activate debug console
$params["debugxajax"] = true; // activate xajax debug (js popup)
$params["connect_at_startup"] = false;
$params["start_minimized"] = true;
$params["nickmarker"] = false;
$params["clock"] = false;
//$params["data_private_path"] = "/dev/shm/mychat"; // specify a special directory to write data on a tmpfs ramdisk (only work on linux)
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>phpFreeChat demo</title>
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>
</head>
<body>
<div style="width: 800px;">
<?php $chat->printChat(); ?>
</div>
<?php
// print the current file
echo "<h2>The source code</h2>";
$filename = __FILE__;
echo "<p><code>".$filename."</code></p>";
echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
$content = file_get_contents($filename);
echo htmlentities($content);
echo "</pre>";
?>
<?php
echo "<h2>Debug</h2>";
echo "<pre>";
$c =& phpFreeChatConfig::Instance();
print_r($c);
print_r($_SERVER);
echo "</pre>";
?>
</body>
</html>
phpFreeChatConfig Object
(
[serverid] => e3aee6568401cebee20f79b60c719862
[nick] => guest
[title] => A simple chat with user's parameters
[channel] => A simple chat with user's parameters
[frozen_nick] => 1
[max_nick_len] => 20
[max_text_len] => 300
[refresh_delay] => 10000
[timeout] => 20000
[max_msg] => 15
[quit_on_closedwindow] =>
[focus_on_connect] => 1
[connect_at_startup] =>
[start_minimized] => 1
[height] => 230px
[width] =>
[shownotice] => 0
[nickmarker] =>
[clock] =>
[openlinknewwindow] => 1
[showwhosonline] => 1
[showsmileys] => 1
[btn_sh_whosonline] => 1
[btn_sh_smileys] => 1
[theme] => default
[themepath] => /home/cassie/public_html/news/src/../themes
[themeurl] => ../themes
[themepath_default] => /home/cassie/public_html/news/src/../themes
[themeurl_default] => ../themes
[language] =>
[output_encoding] => UTF-8
[container_type] => File
[client_script_path] => /home/cassie/public_html/news/demo/demo2_simple_with_params.php
[client_script_url] => ./demo2_simple_with_params.php
[server_script_path] => /home/cassie/public_html/news/demo/demo2_simple_with_params.php
[server_script_url] => ./demo2_simple_with_params.php
[useie7] => 1
[ie7path] => /home/cassie/public_html/news/src/../lib/IE7_0_9
[xajaxpath] => /home/cassie/public_html/news/src/../lib/xajax_0.2.3
[jspath] => /home/cassie/public_html/news/src/../lib/javascript
[usecsstidy] =>
[csstidypath] => /home/cassie/public_html/news/src/../lib/csstidy-1.1
[data_private_path] => /home/cassie/public_html/news/src/../data/private
[data_public_path] => /home/cassie/public_html/news/src/../data/public
[data_public_url] => ../data/public
[smileys] => Array
(
[../themes/default/smileys/msn_smiley.gif] => Array
(
[0] => :-)
[1] => :)
)
[../themes/default/smileys/msn_sad.gif] => Array
(
[0] => :-(
[1] => :(
[2] => :-<
)
[../themes/default/smileys/msn_laugh.gif] => Array
(
[0] => :-D
[1] => :-d
[2] => :d
[3] => :D
[4] => :->
[5] => :>
)
[../themes/default/smileys/msn_tongue.gif] => Array
(
[0] => :-P
[1] => :P
[2] => :-p
[3] => :p
)
[../themes/default/smileys/msn_wink.gif] => Array
(
[0] => ;)
[1] => ;-)
)
[../themes/default/smileys/msn_cry.gif] => Array
(
[0] => :\'(
)
[../themes/default/smileys/msn_hot.gif] => Array
(
[0] => (H)
[1] => (h)
)
[../themes/default/smileys/msn_ooooh.gif] => Array
(
[0] => :-o
)
[../themes/default/smileys/msn_angry.gif] => Array
(
[0] => :-@
[1] => :@
)
[../themes/default/smileys/msn_nerd.gif] => Array
(
[0] => 8-|
)
[../themes/default/smileys/msn_neutral.gif] => Array
(
[0] => :-|
[1] => :|
)
[../themes/default/smileys/msn_dontknow.gif] => Array
(
[0] => :^)
)
[../themes/default/smileys/msn_donttell.gif] => Array
(
[0] => :-#
)
[../themes/default/smileys/msn_eyeroll.gif] => Array
(
[0] => 8-)
)
[../themes/default/smileys/msn_weird.gif] => Array
(
[0] => :-S
[1] => :-s
[2] => :s
[3] => :S
)
[../themes/default/smileys/msn_teeth.gif] => Array
(
[0] => 8o|
)
[../themes/default/smileys/msn_think.gif] => Array
(
[0] => *-)
)
[../themes/default/smileys/msn_sarcastic.gif] => Array
(
[0] => ^o)
)
[../themes/default/smileys/msn_sleepy.gif] => Array
(
[0] => |-)
)
[../themes/default/smileys/msn_brb.gif] => Array
(
[0] => (brb)
)
[../themes/default/smileys/msn_angel.gif] => Array
(
[0] => (a)
[1] => (A)
)
[../themes/default/smileys/msn_embarrassed.gif] => Array
(
[0] => :$
[1] => :-$
)
[../themes/default/smileys/msn_party.gif] => Array
(
[0] => <:o)
)
[../themes/default/smileys/msn_secret.gif] => Array
(
[0] => :-*
)
[../themes/default/smileys/msn_sick.gif] => Array
(
[0] => +o(
)
[../themes/default/smileys/msn_devil.gif] => Array
(
[0] => (6)
)
[../themes/default/smileys/tux1.gif] => Array
(
[0] => (tux1)
)
[../themes/default/smileys/tux2.gif] => Array
(
[0] => (tux2)
)
[../themes/default/smileys/gnu.gif] => Array
(
[0] => (gnu)
)
[../themes/default/smileys/msn_bat.gif] => Array
(
[0] => :-[
[1] => :[
)
[../themes/default/smileys/msn_cat.gif] => Array
(
[0] => (@)
)
[../themes/default/smileys/msn_sheep.gif] => Array
(
[0] => (bah)
)
[../themes/default/smileys/msn_snail.gif] => Array
(
[0] => (sn)
)
[../themes/default/smileys/msn_turtle.gif] => Array
(
[0] => (tu)
)
[../themes/default/smileys/msn_dog.gif] => Array
(
[0] => (dog)
)
[../themes/default/smileys/msn_beer.gif] => Array
(
[0] => (B)
[1] => (b)
)
[../themes/default/smileys/msn_bowl.gif] => Array
(
[0] => (||)
)
[../themes/default/smileys/msn_boy.gif] => Array
(
[0] => (Z)
[1] => (z)
)
[../themes/default/smileys/msn_brheart.gif] => Array
(
[0] => (U)
[1] => (u)
)
[../themes/default/smileys/msn_cake.gif] => Array
(
[0] => (^)
)
[../themes/default/smileys/msn_car.gif] => Array
(
[0] => (au)
)
[../themes/default/smileys/msn_cellphone.gif] => Array
(
[0] => (mp)
)
[../themes/default/smileys/msn_cigarette.gif] => Array
(
[0] => (ci)
)
[../themes/default/smileys/msn_clock.gif] => Array
(
[0] => (o)
[1] => (O)
)
[../themes/default/smileys/msn_coffee.gif] => Array
(
[0] => (C)
[1] => (c)
)
[../themes/default/smileys/msn_coins.gif] => Array
(
[0] => (mo)
)
[../themes/default/smileys/msn_computer.gif] => Array
(
[0] => (co)
)
[../themes/default/smileys/msn_deadflower.gif] => Array
(
[0] => (W)
[1] => (w)
)
[../themes/default/smileys/msn_drink.gif] => Array
(
[0] => (D)
[1] => (d)
)
[../themes/default/smileys/msn_email.gif] => Array
(
[0] => (e)
[1] => (E)
)
[../themes/default/smileys/msn_film.gif] => Array
(
[0] => (~)
)
[../themes/default/smileys/msn_fingerscrossed.gif] => Array
(
[0] => (yn)
)
[../themes/default/smileys/msn_flower.gif] => Array
(
[0] => (F)
[1] => (f)
)
[../themes/default/smileys/msn_gift.gif] => Array
(
[0] => (g)
[1] => (G)
)
[../themes/default/smileys/msn_girl.gif] => Array
(
[0] => (X)
[1] => (x)
)
[../themes/default/smileys/msn_handcuffs.gif] => Array
(
[0] => (%)
)
[../themes/default/smileys/msn_heart.gif] => Array
(
[0] => (L)
[1] => (l)
)
[../themes/default/smileys/msn_highfive.gif] => Array
(
[0] => (h5)
)
[../themes/default/smileys/msn_icon.gif] => Array
(
[0] => (M)
[1] => (m)
)
[../themes/default/smileys/msn_idea.gif] => Array
(
[0] => (I)
[1] => (i)
)
[../themes/default/smileys/msn_island.gif] => Array
(
[0] => (ip)
)
[../themes/default/smileys/msn_kiss.gif] => Array
(
[0] => (K)
[1] => (k)
)
[../themes/default/smileys/msn_lightning.gif] => Array
(
[0] => (li)
)
[../themes/default/smileys/msn_note.gif] => Array
(
[0] => (8)
)
[../themes/default/smileys/msn_phone.gif] => Array
(
[0] => (T)
[1] => (t)
)
[../themes/default/smileys/msn_photo.gif] => Array
(
[0] => (P)
[1] => (p)
)
[../themes/default/smileys/msn_pizza.gif] => Array
(
[0] => (pi)
)
[../themes/default/smileys/msn_plane.gif] => Array
(
[0] => (ap)
)
[../themes/default/smileys/msn_plate.gif] => Array
(
[0] => (pl)
)
[../themes/default/smileys/msn_question.gif] => Array
(
[0] => (?)
)
[../themes/default/smileys/msn_rainbow.gif] => Array
(
[0] => (r)
[1] => (R)
)
[../themes/default/smileys/msn_run.gif] => Array
(
[0] => ({)
)
[../themes/default/smileys/msn_runback.gif] => Array
(
[0] => (})
)
[../themes/default/smileys/msn_sleep.gif] => Array
(
[0] => (S)
)
[../themes/default/smileys/msn_soccer.gif] => Array
(
[0] => (so)
)
[../themes/default/smileys/msn_star.gif] => Array
(
[0] => (*)
)
[../themes/default/smileys/msn_stormy.gif] => Array
(
[0] => (st)
)
[../themes/default/smileys/msn_sun.gif] => Array
(
[0] => (#)
)
[../themes/default/smileys/msn_thumbdown.gif] => Array
(
[0] => (N)
[1] => (n)
)
[../themes/default/smileys/msn_thumbup.gif] => Array
(
[0] => (Y)
[1] => (y)
)
[../themes/default/smileys/msn_umbrella.gif] => Array
(
[0] => (um)
)
[../themes/default/smileys/msn_xbox.gif] => Array
(
[0] => (xx)
)
)
[errors] => Array
(
)
[prefix] => myprefix_
[active] =>
[is_init] => 1
[version] => 0.9.3
[sessionid] => 43d87303a19ef8c25c5d4672dc3c2438
[debugurl] => ../debug
[debug] => 1
[debugxajax] => 1
[container_cfg_chat_dir] => /home/cassie/public_html/news/src/../data/private/chat/asimplechatwithusersparameters
[container_cfg_data_file] => /home/cassie/public_html/news/src/../data/private/chat/asimplechatwithusersparameters/messages.data
[container_cfg_index_file] => /home/cassie/public_html/news/src/../data/private/chat/asimplechatwithusersparameters/messages.index
[container_cfg_nickname_dir] => /home/cassie/public_html/news/src/../data/private/chat/asimplechatwithusersparameters/nicknames
)
Array
(
[DOCUMENT_ROOT] => /home/cassie/public_html
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => Accept: application/xhtml+xml,text/html;q=0.9,text/plain;
[HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
[HTTP_ACCEPT_ENCODING] => gzip
[HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_CONNECTION] => close
[HTTP_HOST] => themeparkvillage.com
[HTTP_PRAGMA] => no-cache
[HTTP_USER_AGENT] => CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
[PATH] => /bin:/usr/bin
[QUERY_STRING] =>
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 38.103.63.58
[REMOTE_PORT] => 44573
[REQUEST_METHOD] => GET
[REQUEST_URI] => /news/demo/demo2_simple_with_params.php
[SCRIPT_FILENAME] => /home/cassie/public_html/news/demo/demo2_simple_with_params.php
[SCRIPT_NAME] => /news/demo/demo2_simple_with_params.php
[SERVER_ADDR] => 74.52.238.18
[SERVER_ADMIN] => webmaster@themeparkvillage.com
[SERVER_NAME] => themeparkvillage.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.8b DAV/2 mod_jk/1.2.25 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 SVN/1.4.6 Server at themeparkvillage.com Port 80
[SERVER_SOFTWARE] => Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.8b DAV/2 mod_jk/1.2.25 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 SVN/1.4.6
[UNIQUE_ID] => tP44nUo07hIAAHrP8MsAAAAD
[PHP_SELF] => /news/demo/demo2_simple_with_params.php
[REQUEST_TIME] => 1231314325
[argv] => Array
(
)
[argc] => 0
)