FreiChat related discussions
Logout should end session

Dear admin,
i wanna ask about end session online, i have logout modul in my custom website, when i click logout im still online seen by other computer..
there are code or command to end session i can put in my logout modul or other?

Dear admin, i wanna ask about end session online, i have logout modul in my custom website, when i click logout im still online seen by other computer.. there are code or command to end session i can put in my logout modul or other?
all you need is Jesus

After logging out how long are you seen online on the other computer ?

After logging out how long are you seen online on the other computer ?
Necessity is the mother of all inventions!

it's about 2 minutes before my username disappears from other computer..
hmm any idea bro to destroy my session(username) more faster?
btw thx for this application very incredible..

it's about 2 minutes before my username disappears from other computer.. hmm any idea bro to destroy my session(username) more faster? btw thx for this application very incredible..
all you need is Jesus

Its possible to integrate freichat session with the module but it wont be easy as it will
require both javascript and php coding .

Its possible to integrate freichat session with the module but it wont be easy as it will require both javascript and php coding .
Necessity is the mother of all inventions!

dear admin,

<!--	For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
Then remove FreiChatX tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->

<?php $ses=$_SESSION['iduser'];

if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

if(is_file("/xampp/htdocs/freichat/arg.php")){

require "/xampp/htdocs/freichat/arg.php";

$temp_id = $ses . $uid;

return md5($temp_id);

}
else
{
echo "<script>alert('module freichatx says: arg.php file not
found!');";
}

return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="../freichat/client/main.php?id=<?php%20echo%20%24ses;?>&xhash=<?php%20echo%20freichatx_get_hash(%24ses);%20?>"></script><link rel="stylesheet" href="../freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css"><!--===========================FreiChatX=======END=========================-->

i already put the code at the head tag in my home website, and it works,
i used the "iduser" as the main session to called the another field in my table like name etc
as with my question when im click logout button, the name("at the freichat client skin") still there and gone after 1 minutes(exactly 1 minute)
can you help me bro?
or can you give me the clue about freichat code when the "iduser" gone

dear admin, &amp;lt;code&amp;gt;&amp;lt;!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code Then remove FreiChatX tables frei_session &amp; frei_chat if necessary The best/recommended way is using the module for installation --&amp;gt; &amp;lt;?php $ses=$_SESSION[&#039;iduser&#039;]; if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/xampp/htdocs/freichat/arg.php&quot;)){ require &quot;/xampp/htdocs/freichat/arg.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: arg.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;../freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;../freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; &amp;lt;/code&amp;gt; i already put the code at the head tag in my home website, and it works, i used the &quot;iduser&quot; as the main session to called the another field in my table like name etc as with my question when im click logout button, the name(&quot;at the freichat client skin&quot;) still there and gone after 1 minutes(exactly 1 minute) can you help me bro? or can you give me the clue about freichat code when the &quot;iduser&quot; gone
all you need is Jesus

If you know which part of the script or function is being executed when the logout button is pressed , you can edit the same and write a query so as to remove the user from the frei_session table of freichat

If you know which part of the script or function is being executed when the logout button is pressed , you can edit the same and write a query so as to remove the user from the frei_session table of freichat

my logout button already have this

<?php session_start();
session_destroy();
echo "<script>window.location = 'index.php'";
?>


But what im confused is the freichat still read the session name and after 1 minute will disappears(seen by other username has logon)
can you help me adesh, im stuck :S

my logout button already have this &amp;lt;code&amp;gt;&amp;lt;?php session_start(); session_destroy(); echo &quot;&amp;lt;script&amp;gt;window.location = &#039;index.php&#039;&amp;lt;/script&amp;gt;&quot;; ?&amp;gt; &amp;lt;/code&amp;gt; But what im confused is the freichat still read the session name and after 1 minute will disappears(seen by other username has logon) can you help me adesh, im stuck :S
all you need is Jesus

session_destroy() is not enough . FreiChat fetches all the online users from the table frei_session

So after session_destroy(); You need to connect to the database here and below query should get executed,

DELETE FROM frei_session WHERE session_id=MY_USER_ID


The above query will delete the user from the freichat session table (frei_session) .

session_destroy() is not enough . FreiChat fetches all the online users from the table frei_session So after session_destroy(); You need to connect to the database here and below query should get executed, &amp;lt;code&amp;gt; DELETE FROM frei_session WHERE session_id=MY_USER_ID &amp;lt;/code&amp;gt; The above query will delete the user from the freichat session table (frei_session) .
Necessity is the mother of all inventions!

Dear admin,
i already added this

<?php session_start();
session_destroy();
include "koneksi/koneksi.php";
$id = $_SESSION[iduser];
$sql = mysql_query("DELETE FROM frei_session where session_id = '$id'");
echo "<script>window.location = 'index.php'";
?>


briliant! It works
God Bless you abudantly

Dear admin, i already added this &amp;lt;code&amp;gt;&amp;lt;?php session_start(); session_destroy(); include &quot;koneksi/koneksi.php&quot;; $id = $_SESSION[iduser]; $sql = mysql_query(&quot;DELETE FROM frei_session where session_id = &#039;$id&#039;&quot;); echo &quot;&amp;lt;script&amp;gt;window.location = &#039;index.php&#039;&amp;lt;/script&amp;gt;&quot;; ?&amp;gt; &amp;lt;/code&amp;gt; briliant! It works God Bless you abudantly
all you need is Jesus
78
8
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft