• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

How can i optimize php free chating code

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby websemtex » Tue Dec 15, 2009 1:33 am

Guys somehow the company I am hosting with they suspend my hosting becouse they said something to do with the chat I am using has caused an overload on the servers. So the only way I can fix they said to optimize the coding.

Any help guys??????????????????

This is what i have php code

$params = array();
$params["title"] = "Safoni Chat";
$params["channels"] = array("Chat");
$params["height"] = "300";
$params["timeout"] = 35000; // Five Minutes of inactivity
$params["refresh_delay"] = 1000;
$params["quit_on_closedwindow"] = true;
$params["nick"] = $user_info['is_guest'] ? "Guest-" . rand(1, 1000) : $user_info['name'];
$params["isadmin"] = false; // do not use it on production servers wink
$params["serverid"] = true; // calculate a unique id for this chat
$params["debug"] = false;
$params["display_pfc_logo"] = false;
$params["max_msg"] = 0;
$params["nickmeta_private"] = array('ip');
$params["displaytabclosebutton"] = false;
$params["quit_on_closedwindow"] = true;
Last edited by websemtex on Tue Dec 15, 2009 2:16 am, edited 1 time in total.
websemtex
New member
 
Posts: 4
Joined: Sun Nov 22, 2009 11:40 pm
Top

Postby OldWolf » Tue Dec 15, 2009 7:14 am

Well, for one, turning the refresh delay up, not down, would help. The default value is 2000, you have it at 1000. Smaller means more refreshes. So increasing it would mean less refreshes, which would mean less stress on the server.

Another think you may want to consider is limiting who can be on at a given time... putting a cap to it.

What your host is really saying though isn't optimize your parameters, but optimize the code itself... the inner workings of the chat, which we unfortunately can't help with. :(
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 25 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub