PHP touch() to update Lastmod?

Status
Not open for further replies.

LazyD

$monies = false;
Dec 7, 2006
655
12
0
Wine Cuntry
wildfoxmedia.com
So I was reading through a PHP/MySQL book I have and ran across the touch() function, according to the book using the touch() function on a file will update its last modified and last accessed time.

In that same thought I have heard that Googlebot's spiders will get the lastmod time and if its been a while or is the same as last time it check it wont re-spider the page and could possibly lead to your page being considered "stale" and having possibly negative affects on your stats, etc.

Now, what would stop from someone, like...I dont know...me from setting up cron to run a PHP script that would go through a sitemap file and touch() all of the URLs in it to update lastmod time?

I ask because I run a credit card site, the credit cards dont get updated that often so this could possibly get me around the "stale" pages...
 


I ask because I run a credit card site, the credit cards dont get updated that often so this could possibly get me around the "stale" pages...

well, as far as i understood it, to call for the google spider is one thing. but another thing is, that you would actually have to have new content or you could get penalized for "spamming" the bots with false update-pings while there is no new content.
 
you woudlnt touch the urls, you would touch() the files. If they are dynamically generated, which theoretically mean, what I think, as long as php is run in them, the last modified date sent with a http header is always current date. I might be wrong.
 
Status
Not open for further replies.