Re: [PHP] last modified on a page
At 4:41 PM -0400 6/29/10, Paul M Foster wrote: On Tue, Jun 29, 2010 at 03:44:37PM -0400, tedd wrote: At 12:11 AM -0400 6/14/10, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. Dave: A bit late but try this: ?php echo Last modified: . date (F d Y H:i:s., getlastmod()); ? Wha--? I never heard of that function before (getlastmod)! Kewl. Paul Paul: Our knowledge is a bit like Swiss cheese, some parts are there and some parts are missing. :-) I have the distinct impression that my missing parts are getting larger. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
At 12:11 AM -0400 6/14/10, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. Dave: A bit late but try this: ?php echo Last modified: . date (F d Y H:i:s., getlastmod()); ? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
On Tue, Jun 29, 2010 at 03:44:37PM -0400, tedd wrote: At 12:11 AM -0400 6/14/10, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. Dave: A bit late but try this: ?php echo Last modified: . date (F d Y H:i:s., getlastmod()); ? Wha--? I never heard of that function before (getlastmod)! Kewl. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
On 14/06/2010, at 4:11 PM, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try using filemtime() and $_SERVER['SCRIPT_FILENAME'] --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Last Modified question..
did you try stat()'ing the file? as long as you have read permission to the file, you should be able to run a stat() on the file with no problems -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED]] Subject: [PHP] Last Modified question.. I have a problem... I want to check the last modified time that a file was changed/updated. Actually, it's an employee database that I'm working on and I thought about just checking the last modified date on the file that the information was stored on. However, I get a permission denied error and I don't want to change the permissions of the file. Is there an easy way to check to see when the last time anyone logged in and updated their 'employee' information? Thanks, jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] last modified
my own 2c: fopen: fwrite into a file of yours, when doing a check: fopen compare the buffer size to the file size you have saved. or the whole HTML code as a string. But, I guess it is very unreliable since there are such things as banner rotations etc... Maybe there's another way to do it I never heard of. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Kasten, Holger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] last modified Hello, how can I check the last modified date of a website. I mean not my own site, I mean other sites. Thanx, Holger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] last modified
In article FA432D4D6C2EC1498940A59C494F153873335B@stca207a, [EMAIL PROTECTED] (Kasten, Holger) wrote: how can I check the last modified date of a website. I mean not my own site, I mean other sites. Use fsockopen(), send a HEAD request, get back (sometimes*) a Last-Modified header. *See RFC 2616 for more info on the inherent limitation of depending on Last-Modified. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]