PDA

View Full Version : Real-Time Web Game - Need a page to open every 1 hour


baskers
08-29-2006, 02:43 AM
Heyas,

I'm creating a web based game but want to simulate real time. I'm using php and mysql and i basically need some php code to be run every hour so that it runs through the procedures to simulate real time. I know how to do it on my client side using javascript but obviously if my computer is off, the whole web game pauses....not the best solution :)

What i'm asking is, is there some way to have a like a page open every hour or somehow get the server to run some php code every hour?

or is their another way to handle this problem?

Mick

siguie
08-29-2006, 04:14 AM
Yes, you want to use a cron job. Look for "cron" in your cpanel.

baskers
08-29-2006, 03:51 PM
Yeah i thought it was cron but when i got to the "enter command" part, i didnt know a 1 line command that would handle the whole lot of code that needs to run.

************ Here i checked google about running php code ******

wget http://www.example.com/mailstock.php

Thats the command that does it..woot! :)

Thanks heaps.