View Full Version : Egg Script
:Edzy
06-04-2007, 11:17 AM
Would there be a way to code a php script to change one image to another at 12 midnight on easter sunday for those egg things to not be a hassle because we had an idea of making one
an egg to hatch to
http://www.uploadz.co.uk/69me+egg.png
Edited by Lµke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks :).
Its easy you could even do it in flash..
Ryan.
06-04-2007, 11:20 AM
Ozzie you love flash innit :p
:Edzy
06-04-2007, 11:22 AM
Ozzie you love flash innit :p
hes a flash guru
Ryan.
06-04-2007, 11:23 AM
hes a flash guru
hmm are we going off topic as usual :)..
Anyway on topic..
Anyone know how?
:Edzy
06-04-2007, 11:24 AM
hmm are we going off topic as usual :)..
Anyway on topic..
Anyone know how?
yer anyone wanna make me one or tell me the code?
EDIT: and ozzie flash can't go in sigs inneht?
Sygon..
06-04-2007, 11:33 AM
Date made. if date made = +12 hours echo new image. blerg
:Edzy
06-04-2007, 12:31 PM
Date made. if date made = +12 hours echo new image. blerg
yer can u put it together :)
Luckyrare
06-04-2007, 01:09 PM
Egg in your mouth, I hope you know where they come from?
You could make it so you have 2 images saved on the server. At 12, run the cron job to copy the new image over the new one. Uses much less bandwidth rather than GD
Drompo
06-04-2007, 01:22 PM
Simple PHP
<?php
$todayis = date("l, F j, Y") ;
if($todayis == "Sunday, April 8, 2007") {
echo "<img src=\"image.gif\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"image.gif\">"; //Image that will appear before easter Sunday
}
?>
Ryan.
06-04-2007, 01:28 PM
Tyvm Ash :)..
When Eddy comes on i'll tell him and he can crack it lol. +rep
:Edzy
06-04-2007, 03:15 PM
Tyvm Ash :)..
When Eddy comes on i'll tell him and he can crack it lol. +rep
Ily, run out of rep today but will tomoz <3
Ash does that make it an image thennn coz i.. ****, you need gd and my host isnt :@
Drompo
06-04-2007, 03:24 PM
Just upload 2 separate images
1 for easter sunday and one for the days upto then
YouFail
06-04-2007, 03:41 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Sunday, April 8, 2007") {
echo "<img src=\"image.gif\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"image.gif\">"; //Image that will appear before easter Sunday
}
?>
If its Easter Sunday, or after it shows the image of the egg. Just drompo's code btw.
:Edzy
06-04-2007, 04:26 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Sunday, April 8, 2007") {
echo "<img src=\"me+egg.png">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif">"; //Image that will appear before easter Sunday
}
?>
C'est une probleme
Drompo
06-04-2007, 04:32 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Sunday, April 8, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
You were missing the backslash before the quotes on the 2nd image
Florx
06-04-2007, 04:38 PM
Simple PHP
<?php
$todayis = date("l, F j, Y") ;
if($todayis == "Sunday, April 8, 2007") {
echo "<img src=\"image.gif\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"image.gif\">"; //Image that will appear before easter Sunday
}
?>
Thanks! +rep if i can.
Edit: DAM AND BLAST! Need to spread! Sorry!
:Edzy
06-04-2007, 04:41 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Sunday, April 8, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
You were missing the backslash before the quotes on the 2nd image
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/edneely/public_html/egg/egg.php on line 3
Drompo
06-04-2007, 05:14 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis > "Sunday, April 8, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
:Edzy
06-04-2007, 05:18 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis > "Sunday, April 8, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
that shows the egg
but when i change to show the other pic today
<?php
$todayis = date("l, F j, Y") ;
if($todayis > "Friday, April 6, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
It wont work
:Edzy
06-04-2007, 05:19 PM
see http://www.edneely.simplex-technologies.com/egg/egg.php
crap double posted :@
YouFail
06-04-2007, 06:06 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Friday, April 6, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
Needs to be => so its if today is 6th April OR Greater.
:Edzy
06-04-2007, 09:28 PM
<?php
$todayis = date("l, F j, Y") ;
if($todayis => "Friday, April 6, 2007") {
echo "<img src=\"me+egg.png\">"; //Image that appears on Easter Sunday
} else {
echo "<img src=\"egg.gif\">"; //Image that will appear before easter Sunday
}
?>
Needs to be => so its if today is 6th April OR Greater.
cheers, i will test it tomorrow
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.