selva Posted December 10, 2009 Share Posted December 10, 2009 Hai All, In php how can i get last modified date of a give web page . I have tried to get last modified from the header but for some pages the server of that webpage doesn't returns lastmodified date.How can i do this with php ? Thanks in advance...... Quote Link to comment Share on other sites More sharing options...
vinpkl Posted December 10, 2009 Share Posted December 10, 2009 in your table insert a new column date. when ever you update your content with your update query, the same time update the date column. $today = date(); vineet Quote Link to comment Share on other sites More sharing options...
blueman378 Posted December 10, 2009 Share Posted December 10, 2009 Dont think thats what Selva is asking, i think they want other peoples last modified, and basically if its not returned, unless its on the page somewhere i dont think you can get it! Quote Link to comment Share on other sites More sharing options...
Adam Posted December 10, 2009 Share Posted December 10, 2009 Yeah this isn't as straight forward as it sounds. Consider that a lot of web sites generate content dynamically, never touching the file. Quote Link to comment Share on other sites More sharing options...
atomicrabbit Posted December 10, 2009 Share Posted December 10, 2009 are the pages being checked static pages or are they being populated via php code and the information is extracted from a database? If they're just static pages, try using filemtime. I've used this to check the last modified date of static files and it works great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.