Zero Identity
Username: Password:
[Forgot Password?] [Not Registered?]

ZI Store Updates

Zi Store

Online Users

Registered Users: 1394
Latest Registration: nixd
Online Users: 7
(0 Members, 7 Guests)

Poll

What should be done with ZI from here on out?
Get the staff to come back and work on it. (18%) [12 Votes]
Shutdown the site. (3%) [2 Votes]
Leave it to rot. (1%) [1 Votes]
Get new staff to work on it. (77%) [51 Votes]

[Poll Archive]


Icon Zero Identity Forums - General - Programming - Date of LastChange in XML sitemap


Are you bored? Check out the unaswered threads!

swiftnomad
Administrator
Public Relations

Avatar
ZI Guru

Joined: 04.04.2008
Last Seen: 02 month(s) ago
Experience: 3189.27
Points: 405
#1 Date of Last Change in XML sitemap on December 27 2009 01:39
Hey fellow programmers- What I'm trying to do is create a sweet sitemap ( it's already done )

So if any of you ever done a sitemap or used xml before know this: <lastmod></lastmod>

Now- what I want to do is have php tell my sitemap when the lastmod was done. Now, this is not a SQL database site- so how can I do this?

Im thinking of creating a cronjob to spider the site and grant permission and write to the xml file? but, how do I ask when this file was last edited?


Code Highlighting :: Select Code
if (sizeof (problems.txt) > CRITICAL){
    exec("> /dev/null"); }


USER: Hello Tech Support? I can't print...
ME: Try cursive then <hang up>
pyr0t3chnician
Member
Too Legit

Avatar
Professional Analyst

Joined: 04.01.2009
Last Seen: 10 year(s) ago
Experience: 455.88
Points: 545
#2 on December 27 2009 11:41
http://php.net/manual/en/function.filemtime.php

Is that what you are looking for?

Another way to do it all would be to FTP the site and you could grab the modify time as well: http://www.php.net/manual/en/function.ftp-mdtm.php

Let me know!

Image


Who is watching forums


Users viewing this page: Guests (1)
Users viewing the forum: 0