473,670 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Expires Meta tag

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
3 3361
.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
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.ne t> wrote in message
news:bh******** *************** *********@4ax.c om...
.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
.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1886
by: Roel Wuyts | last post by:
CALL FOR CONTRIBUTIONS International Workshop on Revival of Dynamic Languages http://pico.vub.ac.be/~wdmeuter/RDL04/index.html (at OOPSLA2004, Vancouver, British Columbia, Canada, October 24-28, 200) Organization committee: Roel Wuyts (primary contact - roel.wuyts@ulb.ac.be), Gilad Bracha, Wolfgang De Meuter, Stéphane Ducasse and Oscar Nierstrasz.
4
4632
by: Daniel Keller | last post by:
Hello! I'm trying to set up a page system using "dynamic" SSI. That means that I normally use the following on my website: <!--#include virtual="file.inc" --> Now I want to make this "dynamic" and I don't have a clue how to do so. I want to link to a file using something like this: <a href="file.shtml?dynamic">Link</a>
5
1858
by: C White | last post by:
I'm trying to write an asp script that will create a series of drop lists based on a table like: canada ontario toronto street name link canada ontario toronto road name link canada ontario hamilton road name link canada alberta calgary street name link canada alberta edmonton street name link usa new york buffalo street name link...
12
6971
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
4
3077
by: Tim::.. | last post by:
Can someone please tell me why the following dynamic refresh doesn't work! Thanks Inline code... <!----- dynamically filled META REFRESH element -----> <meta id="mtaRefresh" runat="server" /> ...CodeBehind
0
2066
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab, System and Software Engineering Lab), ULB (deComp) and the Belgian Association for Dynamic Languages (BADL) are very pleased to invite you to a whole day of presentations about the programming languages Self, Smalltalk and Common Lisp by experts in...
3
1984
by: Tom | last post by:
I have a PHP 4.4.7, MySql 5.0 and I.E. 7. My PHP queries the database and renders the info into html forms. Submitting the forms manipulates the data. Now, the problem is that the browsers are caching the dynamic pages. Once the data is updated, returning to the original viewing page shows the old data until you hit refresh. I know I can have my users adjust their internet file settings to "Check for newer versions of stored pages" to...
14
5400
by: asdf | last post by:
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks
5
1403
by: Nick | last post by:
Hi there, I am adding a meta redirect tag to the page dynamically on 2 separate pages in asp.net. One of the pages it works fine, and 5 seconds after the page appears, the redirect occurs. On another page, the redirect is completely ignored, so I have a couple of questions. 1. Any idea what could prevent redirection? 2. Any idea how I can view my dynamically added tags, and at what point are they visible? (load / init) ?
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.