Jump to content

Background Running Code?


dual_alliance

Recommended Posts

Your question doesn't quite make sense, but [i]maybe[/i] I have an idea of what you are trying to say.

Do you mean a code that will let them know they are still banned & for how many days, & will stay updated?  I designed an automatic member-management thing once, and I just put a simple code at the beginning of the home page, the admin index page, and the login page that ran through the members and changed a boolean flag for members whose expiration dates had passed -- so that you might actually block your own expired access just by trying to login.  Anyone who visited the site caused the updates to occur just by opening the page(s).  There is a name for this, "robot code" or "dummy code" or something, but I can't remember what it is -- but it works really well.  Would something like this work for updating number of banned days with your members?

If that isn't what you mean, can you elaborate?

Wendy
Link to comment
Share on other sites

Well running code in the background with php is impossible.  PHP is a server side language unlike javascript which is a client side language.  To do this in php you will need a mysql database or dat file, what you will need to do is setup a bantime field in your database and have php check it everytime the user logs on.  So in psuedocode:

if (allow >= daysbanned) {

// Allow user stuff here

}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.