|
-
Apr 24th, 2013, 11:32 AM
#3
Frenzied Member
Re: PHP Timing & ETC
Yeah, you're going to want to handle that logic client side with javascript/JQuery(). I would just initially load the last saved data about the character/environment, update any changes on client side (store in cookies as a error fail-safe) and finally when the user successfully initiates a log off / exit, post back to the server with the new values. Use a public/private key process so people can't simply change the values in the cookie to make themselves have 1,000,000 hp, gold and etc...
Or... Before and after altercations, post the data back to the server (with the fail-safe still existing in case of connection failure). The less you have to connect, reconnect and connect again to the database and update, the better. You could also use Persistent connections too I guess.
What ever database/server/client structure you use, implement PDO from the get go.
Justin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|