Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Help please with a simple php script

Author
Message
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 1st Jan 2006 13:38
Hi there

For anyone who knows php better than me I'm sure this will be easy, but I'd be most greatful if you could post the code to do so for me should you have the time

Essentially I want a script to show a different image for every day of the year, with the images named "1.gif" for january the first, all the way up to "365.gif" for the last day of the year.

I had a quick google and found various ways of doing a month (31 images) but converting the day AND month into a single value seems a little more complicated.

If anyone could do this for me I'd be most greatful

Thanks, Sam


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Jan 2006 15:20
echo '<img src="graphics/' . date('z') . '.gif" width="x" height="y" />';

Exit Planet Dust
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Jan 2006 15:21
BTW it's zero based, so January 1st = 0.gif and December 31st = 365.gif

Exit Planet Dust
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 1st Jan 2006 16:22
Awesome thanks Rich! You are a star!


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 1st Jan 2006 20:01
rich - nice avatar!

@Kangaroo, You might want to look into either the PHP online help, or download the extended CHM help file for windows. I have got the non-extended help one working on the Mac too using a 3rd party app.

Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 1st Jan 2006 20:04
Richs avatar is php so it changes all the time nick

Experienced DB http://www.greatgames3d.com (work in progress site)
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 1st Jan 2006 21:21
"download the extended CHM help file for windows"
Where from? that sounmds useful

I confess I have little knowledge of php having stuck with java and javascripts as long as I could. However I'm starting to come round to it being better and more compatible


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Jan 2006 21:55
Get it from the PHP web site in the Documentation section.

Exit Planet Dust
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 1st Jan 2006 22:23
Thanks I didn't know php had an "official" site... is it http://www.php.net/[href]?

Ps Rich I just clicked your website, where has the one with ascii natlie portman gone? I loved the design of that site


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Jan 2006 22:55
Yes php.net is the official site.

The one with the ASCII design is www.fatal-design.com - I also uploaded another 7 of my old site designs, which you can access from the links at the bottom of the page, below Natalie.

Exit Planet Dust
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 1st Jan 2006 23:25
Ah thanks, yes I was checking them out the other day - you used to like semi naked women on sites didn't you! Some cool site links though, and I like your ST site a lot


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 2nd Jan 2006 00:09
Agreed--- the Atari ST site is tops, and the domain name couldn't be better

Login to post a reply

Server time is: 2024-11-16 07:32:00
Your offset time is: 2024-11-16 07:32:00