Php Update

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Php Update

Custergrant
Hey guys,

I'm currently making my own online PHP game, and I'm smack into the middle of the coding. The game is an industry/economy type game where you start out with some initial resources and a building and you expand your business empire by building more buildings that produce more buildings, which can be bought and sold on the live market. Basically, you try and become the wealthiest player in the game by the time the round ends.

My problem is, I need my game to update hourly and not hourly. Meaning, I have codes that update my MySQL database when a user buys or sells and makes transactions in my game. But, every hour, I would like my game to update the users resources with the output that their buildings are creating. If that's a little confusing, it's like a user has a Sawmill that uses 50 logs/hour and puts out 25 Lumber/hour.

I already have a table in my database that has the inputs and outputs/hour for the different buildings, but I need a way to update that into the users' resources. How would I go about doing that? Someone mentioned a cron job, but I'm not too sure.

 

 

 


Reply

9block
Well, I googled around a bit, and the cron option seems the most popular. I seen someone mention a perl script that runs periodically. I don;t know much (actually, almost nothing) about PHP, but could you simply run a second PHP script with a timer or schedual that would trigger a class to update the mySQL?

Reply

it01y2
Try the game travian out and get some ideas of making a game, I am currently making a online game, and i have managed to create a online update system to update resources for each user: crop,iron,bronze and lumber.

If you need any scripts email me or pm me, my website which has many errors and is under construnction is http://www.fsgaming.co.uk

Reply

Custergrant
Yah, I used to play Travian. I would need an update system close to that. Do you have MSN?

Reply

it01y2
QUOTE(Custergrant @ Jul 19 2007, 09:56 PM) *
Yah, I used to play Travian. I would need an update system close to that. Do you have MSN?


yea i have msn messenger it is ichhabezwei@hotmail.com

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Similar Topics

Keywords : php update

  1. Mysql Won't Update - (4)
    Ok, so I'm making some arcade administration software so I don't have to add games the hard
    way, well anyway, one of the features I have is that on the homepage is a featured author and as
    such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
    varibles fine and the updating page recieves them because I echoed everything, then I build the
    query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
    database itself won't update even though all the varibles are there. Here's...
  2. Sending E-mails After News Update? - Coding needed?!? (8)
  3. Concurrency Problem? - update together in the same time (1)
    I have a problem in PHP. When more than one client update something in database, they won't
    work. so, how do I make out for it? example: at the same time, in real-time chatboard, 2 persons
    click CHAT, what can I do so that both of them actually chat? or at bidding website, when 2 persons
    bid at same time, how could I do that? thanks for answer....
  4. Mysql Update Everything - Bit confusing (4)
    i need to make a script that will take a number from every record in a mysql table, takeaway 1 from
    them all then replace them all in the right places. so if it looked like Record 1 5 Record 2 8
    Record 3 9 then i exectue the script then it turns into: Record 1 4 Record 2 7 Record 3 8 i
    cant think of a way to do this so if you can help id be very greatful. Thanks in advance Andre...



Looking for php, update

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for php, update

*MORE FROM TRAP17.COM*
advertisement



Php Update



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE