I'm developing an app (using HTML / PHP / Java Script) for Facebook.
When the app is opened, there is button Start. After clicking, it should show some pictures.
App duration is from 1st of December to 25th of December.
Each day after clicking Open
It should show different image. For example on 1st of December should show 1.jpg, on 2nd of December should show 2.jpg and so on.
What is best way to achieve It? Should I create Cron Job? Should I create separate files for everyday? 1.php, 2.php and etc? Or I have to create game.php and add there different DIVS
for everyday and with Java Script show required DIV
for current day?
Index.html looks like:
<div id="main" class="main">
<img src="images/background.png" alt="Christmas Game" class="background_main">
<input type="image" src="images/start.png" alt="Start Game" class="start_btn" onClick="parent.location='game.php'" />
</div>
By click button from index.html It should redirect me to correct content of current day.
Game.php looks like this:
<div id="main" class="main">
<img src="images/day1/game.png" alt="Christmas Game" class="game">
<a href="downloads/coupon.jpg" download="coupon.jpg" title="Prize Coupon">
<img src="images/day1/download.png" alt="Download Coupon" class="download">
</a>
</div>
Somehow I need to make It dynamic that everyday opened different images / pages.
If something unclear - ask me, I will try provide more details.