This site is for sale,
Learn More
Google Cache File Date Stamp In PHP
See When A Page Is Spidered
Originally Published: February, 2004
Editor's Note:
If your pages don't use PHP read this article to learn
how to add a date stamp using server side includes.
Google caches pages and you can view these cached pages to see why the page was found for your search. When you are frequently revising pages it can be helpful to see the date the cached page was spidered by Google. This article shows how to date stamp PHP pages so you can view this date in Google's cache.
For this code to work your page must be parsed as a PHP page by your server. This usually means that the page must have a .php extension.
Here is the date stamp code we use at the bottom of each page:
<?php
$the_date = "Today is ".date ("l, F d Y");
$the_time = "The time is ".date ("H:i \(O")." GMT)";
$all_date = $the_date.'<BR>'.$the_time;
echo $all_date;
?>
This is a typical output from our code:
Today is Monday, February 09 2004
The time is 14:44 (-0500 GMT)
The 'date' function used in this code has many formatting options, the complete documentation is at
http://www.php.net/manual/en/function.date.php
The easiest way to include this code is to put it in a PHP include file and call that file from each page on your site. The code for calling the include will look something like this:
include(date-time.incl.php);
This code can be put at the bottom of each page in a font smaller than your normal font size. Most users won't notice it but you can easily find it when looking at Google's results.
Editor's Note:
Google now includes the date & time that a page was spidered but this code may be helpful for other search engines.
©2005 SearchEnginePromotionHelp.com, All Rights Reserved.
Site Promotion Articles Indexes:
|