Jump to content

Chat help

Recommended Posts

I currently have a decent little chatbox...I have it saving in a database...Today I was temporarily suspended by my hosting company which is supposedly unlimited for exceeding there limits...Which really doesnt make sense to me. However, it is what it is...I am wondering how I would go about changing my chatbox to report to a txt file and or...how to set it up to truncate the table once every 5 hours or something similar. I know I can set it up on a cron to clear at reset each night...which just might be the best idea...But how do I go about this. Basically I am a novice coder by any means and need the help. I am willing to give a reward to those who help me if it is needed.

Link to comment
Share on other sites

Create a 5 hour cron then just do

$db->query("TRUNCATE TABLE xxxxx;");

xxxxxx being the name of your chat table


include "config.php";
global $_CONFIG;
if($_GET['code'] != $_CONFIG['code']) { die(""); }
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->query("TRUNCATE TABLE xxxxx;");
Edited by illusions
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...