Sagewire Logo

Question about time...

13 Message(s) by 6 Author(s) originally posted in php general


From: japruim Date:   Wednesday, October 24, 2007
--Apple-Mail-17-200294152
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed

Hi Everyone,

I am attempting to get the logic of something figured out and I
thought someone might be able to confirm what I'm thinking :)

I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead. I was playing
around with mktime and it showed very different time stamps for
11/1/07 and 11/1/08 so I can not set it to compare specifically to the
timestamp.. But,'d I be able to have it evaluate the string
stored in php as 11/1/07 and create a timestamp to compare todays
date to, and if it matches within the month, have it display the
turkey? and if not, have it display a different graphic?

I'm attempting to be able to make small changes to my website without
having to remember to do them or change them :)

I hope I have made enough sense that someone can point me in the right
direction :)

Thanks for looking!

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx
--Apple-Mail-17-200294152--


From: japruim Date:   Wednesday, October 24, 2007
Errr... Never mind... Soon as I hit send I got a brain storm... I
just do this:

<?PHP

$month = date('m');
if ($month == "11"){
echo "turkey";
}else{
echo "No turkey";

}
?>


Or something similar, I will try and feather it out and see how it
works for multiple holidays :) (IE: Thanksgiving, Christmas, New
Years, Halloween etc. etc.)
wrote in message :

Hi Everyone,
I am attempting to get the logic of something figured out and I
thought someone might be able to confirm what I'm thinking :)
I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead. I was playing
around with mktime and it showed very different time stamps for
11/1/07 and 11/1/08 so I can not set it to compare specifically to
the timestamp.. But,'d I be able to have it evaluate the string
stored in php as 11/1/07 and create a timestamp to compare todays
date to, and if it matches within the month, have it display the
turkey? and if not, have it display a different graphic?
I'm attempting to be able to make small changes to my website
without having to remember to do them or change them :)
I hope I have made enough sense that someone can point me in the
right direction :)
Thanks for looking!
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx


From: parasane Date:   Wednesday, October 24, 2007
wrote in message:
Hi Everyone,
I am attempting to get the logic of something figured out and I
thought someone might be able to confirm what I'm thinking :)
I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead. I was playing
around with mktime and it showed very different time stamps for
11/1/07 and 11/1/08 so I can not set it to compare specifically to the
timestamp.. But,'d I be able to have it evaluate the string
stored in php as 11/1/07 and create a timestamp to compare todays
date to, and if it matches within the month, have it display the
turkey? and if not, have it display a different graphic?
I'm attempting to be able to make small changes to my website without
having to remember to do them or change them :)
I hope I have made enough sense that someone can point me in the right
direction :)
Thanks for looking!
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx
<?


if(date("M") == "11") {
// Display turkey
}
?>

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he will eat for a day. Then you will find out he was
allergic and is hospitalized. See? No good deed goes unpunished....


From: richardh Date:   Wednesday, October 24, 2007
I am attempting to get the logic of something figured out and I thought
someone might be able to confirm what I'm thinking :)
I want to be able to display something like an image of a turkey during
the month of november from now until I'm dead. I was playing around with
mktime and it showed very different time stamps for 11/1/07 and 11/1/08
so I can not set it to compare specifically to the timestamp.. But,'d
I be able to have it evaluate the string stored in php as 11/1/07 and
create a timestamp to compare todays date to, and if it matches within
the month, have it display the turkey? and if not, have it display a
different graphic?
I'm attempting to be able to make small changes to my website without
having to remember to do them or change them :)
I hope I have made enough sense that someone can point me in the right
direction :)



Well, I hope this makes sense:

<?php
if (date('m') == 11) {
echo '<img src="turkey.png" />
';
}
?>

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support


From: parasane Date:   Wednesday, October 24, 2007
wrote in message:
wrote in message:
> Hi Everyone,
>
> I am attempting to get the logic of something figured out and I
> thought someone might be able to confirm what I'm thinking :)
>
> I want to be able to display something like an image of a turkey
> during the month of november from now until I'm dead. I was playing
> around with mktime and it showed very different time stamps for
> 11/1/07 and 11/1/08 so I can not set it to compare specifically to the
> timestamp.. But,'d I be able to have it evaluate the string
> stored in php as 11/1/07 and create a timestamp to compare todays
> date to, and if it matches within the month, have it display the
> turkey? and if not, have it display a different graphic?
>
> I'm attempting to be able to make small changes to my website without
> having to remember to do them or change them :)
>
> I hope I have made enough sense that someone can point me in the right
> direction :)
>
> Thanks for looking!
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> japruim@xxxxxxxxxxx
>
>
>
<?
if(date("M") == "11") {
// Display turkey
}
?>

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
Give a man a fish, he will eat for a day. Then you will find out he was
allergic and is hospitalized. See? No good deed goes unpunished....



Sorry, that should have been a lower-case M.

<?
if(date("m") == "11") {
// Display turkey
}
?>


--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he will eat for a day. Then you will find out he was
allergic and is hospitalized. See? No good deed goes unpunished....


From: japruim Date:   Wednesday, October 24, 2007
wrote in message:

I am attempting to get the logic of something figured out and I
thought someone might be able to confirm what I'm thinking :)
I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead. I was
playing around with mktime and it showed very different time
stamps for 11/1/07 and 11/1/08
so I can not set it to compare specifically to the timestamp.. But,
'd I be able to have it evaluate the string stored in php as
11/1/07 and create a timestamp to compare todays date to, and if
it matches within the month, have it display the turkey? and if
not, have it display a different graphic?
I'm attempting to be able to make small changes to my website
without having to remember to do them or change them :)
I hope I have made enough sense that someone can point me in the
right direction :)
Well, I hope this makes sense:
<?php
if (date('m') == 11) {
echo '<img src="turkey.png" />
';
}
?>


Yeah... The joys of dealing with a cold that makes your head feel
like it wants to explode and you just wish it'd so it'd feel
better :)

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx


From: instructicc Date:   Wednesday, October 24, 2007
--_972addd4-9aac-4249-acca-f56deaf561df_



I want to be able to display something like an image of a turkey =20
during the month of november from now until I'm dead.



And how will the application know when you are dead?

_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook =96 together at last. =A0=
Get it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=3DCL10062=
6971033=

--_972addd4-9aac-4249-acca-f56deaf561df_--


From: parasane Date:   Wednesday, October 24, 2007
wrote in message:
> I want to be able to display something like an image of a turkey
> during the month of november from now until I'm dead.
And how will the application know when you are dead?
_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook =96 together at last. G=
et it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=3DCL100=
626971033<?


echo "</LIFE>\n";
die($jason);
?>

--=20
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he will eat for a day. Then you will find out he was
allergic and is hospitalized. See? No good deed goes unpunished....


From: bastien_k Date:   Wednesday, October 24, 2007
what about=20

if (date("m") =3D=3D 11){=20
echo "";
}
bastien----------------------------------------> To: php-general@xxxxxxxxxxx> Fr=
om: japruim@xxxxxxxxxxx> Date: Wed, 24 Oct 2007 15:57:38 -0400> Subject: [PH=
P] Question about time... Hi Everyone, I am attempting to get the logic=
of something figured out and I> thought someone might be able to confirm w=
hat I'm thinking :) I want to be able to display something like an image =
of a turkey> during the month of november from now until I'm dead. I was pl=
aying> around with mktime and it showed very different time stamps for> 11/=
1/07 and 11/1/08 so I can not set it to compare specifically to the> timestam=
p.. But,'d I be able to have it evaluate the string> stored in php as 1=
1/1/07 and create a timestamp to compare todays> date to, and if it matches=
within the month, have it display the> turkey? and if not, have it display=
a different graphic? I'm attempting to be able to make small changes to =
my website without> having to remember to do them or change them :) I hop=
e I have made enough sense that someone can point me in the right> direction =
:) Thanks for looking! -- Jason Pruim> Raoset Inc.> Technology Manage=
r> MQC Specialist> 3251 132nd ave> Holland, MI, 49424> www.raoset.com> japr=
uim@xxxxxxxxxxx

_________________________________________________________________
Have fun while connecting on Messenger! Click here to learn more.
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger=


From: japruim Date:   Thursday, October 25, 2007
wrote in message:

I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead.
And how will the application know when you are dead?



Well, I code all of my applications to receive RFID signals, and I
had a RFID transmitter embedded into me that gets powered by the
electricity that my body generates, so when it can no longer get that
signal, the application is designed to shut down and put up a message
that says "Due to the death of my creator I quit, have a nice day!" :)--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx


From: japruim Date:   Thursday, October 25, 2007
wrote in message:

wrote in message:
> I want to be able to display something like an image of a turkey
during the month of november from now until I'm dead.

And how will the application know when you are dead?
When you stop paying for hosting, the application get's the idea
when it's bits go poof!
If anyone ever noticed, my web site (http://sperling.com) has a
tree on it that changes with the seasons. I use:
$dates = getdate();
$month = $dates['mon'];
$w = "http://www.sperling.com/css/seasons/";
switch( $month )
{
case "03": case "04": case "05":
$var = $w . "spring.jpg";
break;
case "06": case "07": case "08" :
$var = $w . "summer.jpg";
break;
case "09": case "10": case "11":
$var = $w . "fall.jpg";
break;
case "12": case "01": case "02":
$var = $w . "winter.jpg";
$break;
}
echo($var);
And this code is called from within my css file for a background
image. Yes, I use variables in css.
Cheers,
teddHi tedd,



That's actually where I got the idea, just could not remember who on
what list said they did it :) using variables in css is it as easy as
just putting in a quick <?PHP echo "background: $date"; ?> in the
css? or is it more complicated?

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx


From: znemeth Date:   Thursday, October 25, 2007
2007. 10. 25, csütörtök keltezéssel 09.01-kor Jason Pruim ezt írta:
wrote in message:
wrote in message:
> I want to be able to display something like an image of a turkey
> during the month of november from now until I'm dead.
And how will the application know when you are dead?
>
> When you stop paying for hosting, the application get's the idea
> when it's bits go poof!
>
> If anyone ever noticed, my web site (http://sperling.com) has a
> tree on it that changes with the seasons. I use:
>
> $dates = getdate();
> $month = $dates['mon'];
> $w = "http://www.sperling.com/css/seasons/";
> switch( $month )
> {
> case "03": case "04": case "05":
> $var = $w . "spring.jpg";
> break;
> case "06": case "07": case "08" :
> $var = $w . "summer.jpg";
> break;
> case "09": case "10": case "11":
> $var = $w . "fall.jpg";
> break;
> case "12": case "01": case "02":
> $var = $w . "winter.jpg";
> $break;
> }
> echo($var);
>
> And this code is called from within my css file for a background
> image. Yes, I use variables in css.
>
> Cheers,
>
> tedd
Hi tedd,
That's actually where I got the idea, just could not remember who on
what list said they did it :) using variables in css is it as easy as
just putting in a quick <?PHP echo "background: $date"; ?> in the
css? or is it more complicated?



you have to configure apache to handle css files as php files.
also you've to send headers including content-type set to text/css

and then you can script your css

greets
Zoltán Németh

--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxxx





From: parasane Date:   Thursday, October 25, 2007
wrote in message:
2007. 10. 25, cs=FCt=F6rt=F6k keltez=E9ssel 09.01-kor Jason Pruim ezt =ED=
rta:
wrote in message:
>
wrote in message:
> > I want to be able to display something like an image of a turkey
> > during the month of november from now until I'm dead.
>
> And how will the application know when you are dead?
> >
> > When you stop paying for hosting, the application get's the idea
> > when it's bits go poof!
> >
> > If anyone ever noticed, my web site (http://sperling.com) has a
> > tree on it that changes with the seasons. I use:
> >
> > $dates =3D getdate();
> > $month =3D $dates['mon'];
> > $w =3D "http://www.sperling.com/css/seasons/";
> > switch( $month )
> > {
> > case "03": case "04": case "05":
> > $var =3D $w . "spring.jpg";
> > break;
> > case "06": case "07": case "08" :
> > $var =3D $w . "summer.jpg";
> > break;
> > case "09": case "10": case "11":
> > $var =3D $w . "fall.jpg";
> > break;
> > case "12": case "01": case "02":
> > $var =3D $w . "winter.jpg";
> > $break;
> > }
> > echo($var);
> >
> > And this code is called from within my css file for a background
> > image. Yes, I use variables in css.
> >
> > Cheers,
> >
> > tedd
>
>
> Hi tedd,
>
> That's actually where I got the idea, just could not remember who on
> what list said they did it :) using variables in css is it as easy as
> just putting in a quick <?PHP echo "background: $date"; ?> in the
> css? or is it more complicated?
you've to configure apache to handle css files as php files.
also you've to send headers including content-type set to text/css
and then you can script your css
greets
Zolt=E1n N=E9meth
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> japruim@xxxxxxxxxxx
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Or, in the event that you're unable to set MIME types and parsing,
you can just add the appropriate <style></style> tags and then
<? include('css/style.css'); ?>

--=20
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he will eat for a day. Then you will find out he was
allergic and is hospitalized. See? No good deed goes unpunished....



Next Message: help with code not wrking


Blogs related to Question about time...

Re: Question on "More Time" [by 3kidsmom]
Family Law:: Question on "More Time" As far as I know, there is nothing to stop you except a flat wallet. 'tis expensive, as you well know.

Domainer Time Based Redirect PHP script - Part 1
That concludes part 1 of the domainer time redirection system, I’ll try and get the next part written in the next week. Let me know if you have any questions or suggestions and I’ll help if I can. I’m no *nix expert, I just know enough ...

Comment on Question time from yesterday regarding police raids by ...
Habeas corpus = “one-size- fits-all absolutism”? No to torture = “one-size- fits-all absolutism”? OK, I’m an absolutist. Are you a moral relativist, jh? Do you believe that a person accused of terrorism by someone (the Algerian ...

WordPress Wednesdays: Center and Border your Images using CSS
To begin, open your index.php. If you are using the WordPress Theme Editor follow this path: Dashboard > Presentation > Theme Editor, you will find the index.php file’s link in the right vertical navigation within the Theme Editor ...

Cannot Allocate Memory Error
Should I go with an earlier version of PHP? Set up a cron job to restart Apache? I usually try one thing at a time to try to identify what works, so the order to try things in is another question, and since I restarted Apache today, ...

Situation in Riau turns chaotic
From that time that morning up to night they confess busy to respond to or answer question telephone and SMS that the contents question truth/fact news to a number of mass medial with respect to situation 7 residents Regency Siak ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional