mii mii - 1 year ago 72
PHP Question

Echo text after an amount of time

Hello im trying to make a logout session.. my problem is that its not visible if im logged out or not after an amount of time so im trying to write out a text to let the user now its logged out..
As i understood from now i do not get logged out until i update my site again, so i want to echo out the text without updating my site.. is this possible?!

Here is my homemade code

if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 20)) {
echo "you have been logged out";

My logout.php aswell


Some help and advice would be great!

mii mii
Answer Source

Hello again I was able to solve my problem. I post my solution here for other people.. The problem was easier than i thought all i did was to get the logout session and append a "text" or in the case a picture after an amout of time...

setTimeout(picture, 3000);

function picture(){
    $("body").append('<img src="boll.gif" id = "boll">');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download