jsntg Posted January 5, 2011 Share Posted January 5, 2011 Hello, first time poster here and PHP newbie. I was directed here by the html forum. I need help adding a time + date stamp to videos I upload to my web page. I have searched this and other formus and not seen a similar query / solution. Here is my page: http://ob-kc.com/tl.html The thumbnails are linked to their respective timelapse videos. Between the thumbnail itself and the label (i.e. '7 am - 8 am') I would like to add 'Updated x/x/2011 @ xx:xx:xx' Any suggestions on the cleanest way to do this? Hugh Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 5, 2011 Share Posted January 5, 2011 have a datetime field in your database, oh say call it last_updated. then you can simply grab it when you are populated your 'cells' and format it however you desire (easiest to let mysql format it when pulling the inof) Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 5, 2011 Share Posted January 5, 2011 have a datetime field in your database, oh say call it last_updated. then you can simply grab it when you are populated your 'cells' and format it however you desire (easiest to let mysql format it when pulling the inof) You can also set the field to auto-populate the timestamp whenever the record is created/updated. Quote Link to comment Share on other sites More sharing options...
jsntg Posted January 5, 2011 Author Share Posted January 5, 2011 Thanks for the quick reply! I am not using a database. The images and descriptors are organized in an html table. I plan to add another cell between the image and the descriptor to carry the time stamp. Clarification: I need to display the time the avi was created, not uploaded. This is the time displayed in the 'Modified' field in the file manager on my local drive. Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 5, 2011 Share Posted January 5, 2011 filemtime(): This function returns the datetime the file was last modified. http://www.php.net/manual/en/function.filemtime.php Quote Link to comment Share on other sites More sharing options...
jsntg Posted January 6, 2011 Author Share Posted January 6, 2011 @mjdamato Haha, my first PHP routine ! This language is almost as slick as Fortran Getting closer. This function returns the time the file was uploaded. Is there a way to return the date / time the file was generated in at my home 'puter? Mucho mahalo. MOD Edit: Extra line feeds removed. Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 6, 2011 Share Posted January 6, 2011 Is there a way to return the date / time the file was generated in at my home 'puter? Um, no. How is the server going to know that? You would have to submit the file time when you upload the file. There is no automated way to do that which I can think of. You could use a java (not javascript) applet. You would either have to find one or build one yourself, but that would create a security risk for the user. I would never install such an applet for any site. So, you would need to include a field for the user to enter the date in when they upload the file. 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.