Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

PHP Question


ghost's Avatar
0 0

i've thinked about how the on-line mmorpg games doing this: you have 100 of gold, and every minute you will get to this amount +1. how they are doing this? thanks


ghost's Avatar
0 0

they probably have a cronjob set to run a script every hour that runs through the entire database and adds 1 to everyone's score.


spyware's Avatar
Banned
0 0

If you want to do it the tricky way: PHP + cURL.


ghost's Avatar
0 0

spyware wrote: If you want to do it the tricky way: PHP + cURL.

Wtf are you talking about, how do you expect that to work ? Japanese is right the best way to do is with cronjob a.k.a. schedule task.


ghost's Avatar
0 0

yes but that gold isn't only thing. there are lots of things that are upgraded, but this can also been upgraded by using some researches, so if you research for example "better mining" you will have gold every 10 secs instead of 1 min etc. etc.


ghost's Avatar
0 0

They can have cronjob each 10 seconds, and it does the +1 depending if you have fast minning or not. Also cron job can run PHP Script or an application. It's rare that it's an application, but for task that are execute a lot of time, it can be faster.


ghost's Avatar
0 0

thanks