By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,714 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,714 IT Pros & Developers. It's quick & easy.

Dynamic Expires Meta tag

P: n/a
Hi there,

I have a database with documents that have event dates included. What I need
to do is have the Expires META tag to be one day after that event date.

Can I get the date from the appropriate field in the database and format it
into GMT to add into the header() function?

Cheers

Steven
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
.oO(Steven)
I have a database with documents that have event dates included. What I need
to do is have the Expires META tag to be one day after that event date.
You don't need a meta-element, use an Expires header instead.
Can I get the date from the appropriate field in the database and format it
into GMT to add into the header() function?


Yep. According to RFC 2616 (HTTP 1.1) the date has to be in a form like
this to be valid for the Expires header:

Thu, 01 Dec 1994 16:00:00 GMT

Micha
Jul 17 '05 #2

P: n/a
Hi there,

Yes, sorry I meant the expires header. These documents used to be hand coded
and so the expires date was update manually.

What I need now is a way of populating the expires header with data from the
database.

Can this be done???

Cheers

Steven
"Michael Fesser" <ne*****@gmx.net> wrote in message
news:bh********************************@4ax.com...
.oO(Steven)
I have a database with documents that have event dates included. What I needto do is have the Expires META tag to be one day after that event date.


You don't need a meta-element, use an Expires header instead.
Can I get the date from the appropriate field in the database and format itinto GMT to add into the header() function?


Yep. According to RFC 2616 (HTTP 1.1) the date has to be in a form like
this to be valid for the Expires header:

Thu, 01 Dec 1994 16:00:00 GMT

Micha

Jul 17 '05 #3

P: n/a
.oO(Steven)
What I need now is a way of populating the expires header with data from the
database.

Can this be done???


Sure, just fetch your date from the database (as Unix timestamp if
possible), format it with date() or strftime() and use the header()
function to create the Expires header.

Micha
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.