Unstoppable Domains

Daily Code Generator (Cron Job possibly?)

Spaceship Spaceship
Watch

dc1pop

VIP Member
Impact
13
Hi,

Im wanting to create a section on my flash game site that has a new game shown every 24 hours and code can be added to that users site so the game can be accessed on their site and a new game shown everyday.

What i need to do i guess is create a cron job? But im not really 100% sure what i should be doing. As obviously i need to rename or possibly mask (if possible) a flash file name as each day the file name is the same all be it a different game.

The games in question would be from a database of games.

Anyone have any ideas?

Thanks :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Just make a new table in your database named DailyGame. Then either using a cron or just hard code it to your main page of your site do:

1.) Check if DailyGame table has a game selected, if not select one and add it to the table.
2.) Create a game.php or whatever and have it do three things. 1.) Get the date, 2.) Take date and search DailyGame table for today's game, 3.) If found display game, if not found, select a game to be used as daily, insert it into the table and display.

No cron jobs involved.

Cron method.
1.) Create a cron and run every 24 hours. It will do the steps above
 
1
•••
Intresting. Will have a crack at that tommorow!!

Thanks!
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer

We're social

Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back