Jump to content

$static_update question


Iank1968

Recommended Posts

here is the code

$credit_time = 3*60*60; // how often should we give logon credits (secs)
$credit_amount = 2500; // the number of cents we give if they logon after that interval
$static_update = 300; // updates every 5 seconds

 

the updates every 5 seconds, would that bog down the server and cause a major bottleneck? can I get rid of it?

 

Thanks

Link to comment
Share on other sites

I am new to PHP so please forgive me. I assume the static updates updates the players profile every 5 seconds to receive login credits which they only get every 3 hours. I did bump it up to 200 and everything is running ok.

 

When several people where on and playing the app crashed, it hasnt done that since I bumped it to 200. What I want to know is can I get rid of it? is it a nessesary function?

 

again please forgive me if im not making a whole lot of sense lol

Link to comment
Share on other sites

I am new to PHP so please forgive me. I assume the static updates updates the players profile every 5 seconds to receive login credits which they only get every 3 hours. I did bump it up to 200 and everything is running ok.

 

When several people where on and playing the app crashed, it hasnt done that since I bumped it to 200. What I want to know is can I get rid of it? is it a nessesary function?

 

again please forgive me if im not making a whole lot of sense lol

 

The code you have posted simply assigns numbers to variables. It doesn't appear to be relevent to your question. We need to see the relevent code where this $static_update variable is used to do these updates you speak of before we can even begin to understand what you are talking about.

 

Moving this to 3rd Party Scripts as it is now obvious this code is not written by you.

Link to comment
Share on other sites

no this script was written by someone else who I cannot get ahold of now. its the only problem im having with this script. I thought it would be an easy solution, boy was I wrong lol. Let me get the rest of the code and post that. Hopefully it will be an easy solution.

Link to comment
Share on other sites

You could store user states in a database and run a cron script.  It could clean inactive data automatically and then increment an online counter accordingly.

 

 

What was probably killing your server earlier was either the number of threads required to respond to that many open connections, or a KeepAliveTimeout setting.  Or, your code could be intensive and/or badly written.

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.