finding the date of an uploaded file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mendingo
Forum Commoner
Posts: 28
Joined: Sun May 23, 2004 1:27 pm

finding the date of an uploaded file

Post by mendingo »

Is there a way to get the date of an uploaded file?

I want to extract the date a file was created when it's been uploaded to my site. Using stat() gets me nothing at all, and using filemtime and filectime both return me the date the file was uploaded, rather than its original datestamp.

Is what I'm trying to do even possible?
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

I dont see how it's possible. Since different filetypes store the created date differently (if at all). You'd have to rely on the OS's record of the create, which when uploaded, switches computers so that record isn't available.
User avatar
mendingo
Forum Commoner
Posts: 28
Joined: Sun May 23, 2004 1:27 pm

Post by mendingo »

I thought that might be the case, thanks.
Post Reply