Jump to content
MakeWebGames

Recommended Posts

Posted

Ok i was looking around ce for some thing to keep my members active. I noticed Total time loggedin.

Add this to where you want to display:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

To display it:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You might need to edit my code since my source is quite different :)

Now for the minute cron:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now for those who dont understand TTL in your game add this to header:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now for the final part SQL:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Enjoy.

Posted

Re: [FREE] Total time logged in [v1 + v2]

Nice mod, How will this work on a much larger game? I am considering using it but good thinking Killah :wink:

 

-Robert™

Posted

Re: [FREE] Total time logged in [v1 + v2]

Good thinking will. I never thought of that :lol:

 

Nice mod, How will this work on a much larger game? I am considering using it but good thinking Killah :wink:

-Robert™

A larger game i guess you could just do the same? its only updating people who are active in the last 3 minutes :)

Posted

Re: [FREE] Total time logged in [v1 + v2]

I think another abbreviation should be used. To me TTL means either: Time To Live or Transistor-Transistor Logic.

TTLO?

Posted

Re: [FREE] Total time logged in [v1 + v2]

Depend's on your server if you are on a dedicated server it would only slow down by like 0.0000099 of a seccond but shared could slow it down abit but i don't know.

Guest Anonymous
Posted

Re: [FREE] Total time logged in [v1 + v2]

Well that's the trouble... A tight loop continually updating the database engine, not a good idea.

It won't make much difference on small games, but a large system, it would need to be optimized.

Posted

Re: [FREE] Total time logged in [v1 + v2]

Not To Be Rude That Would Make It 10 Times Worse Think About It There Are 60 Minuites And 24 Hours Tell Me Which Is Bigger :) Id Rather Count Hours If There Is Away

Guest Anonymous
Posted

Re: [FREE] Total time logged in [v1 + v2]

Yes, get rid of it.

It's an unnecessary evil. Running stuff like this in a cron will just result in lag. A large % of the data is in the web-server logs. Any standard hosting company has stats based on these logs, showing visitors, returning visitors, uniques etc.

Thinking along those lines. it would be simple to write a simple include that registers each page hit with the current user id into a table.

Analysis of this table could be performed easily, quickly and effectively off-line without slowing down the main system at all.

Posted

Re: [FREE] Total time logged in [v1 + v2]

Thanks for the advice guys despite what Nyna said im going to try it on my free web host game 1st

see how bad it lags if all goes good i will then test it on my alpha game .... Once again thanks for the feedback much apreicated

Posted

Re: [FREE] Total time logged in [v1 + v2]

Well really there is no point of this, it's just gonna make your game run slow no matter what, maybe it's possible to do somthing that record's when you loggedin.php so going onto the game at say 20:16 and logout at 20:18 some how calculating but maybe it's not possible.

Posted

Re: [FREE] Total time logged in [v1 + v2]

All these posts in just one day. sheesh i am very sad to see this. BUT! let me tell you this:

 

I went to my server and asked is it fine to run this cron per minute he says even with a database with over 50k members it will run perfect and why? because its only selecting A FEW!

If you put this on torncity it will the run the same updating 300 queries is not that much when normaly a five minute cron is updating a hole database for christ sakes! so please next time go look around befor you people post such rubish!

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