SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get file upload date

    Hi,
    I would like to create a script that behaves differently according to the date it was uploaded to the webserver. Meaning - if I send the script to 10 friends and each one uploads it to his server on a different date - each one will get a different behavior.

    Something like:
    uploaddate=getuploaddate();
    if uploaddate between Jan 1...Jan15, 2010
    do this1;
    elseif uploaddate between Jan 16...Jan31, 2010
    do this2;
    elseif uploaddate between Feb 1...Feb 15, 2010
    do this3;
    etc.

    My question: Which function can I use to get the upload date (instead of getuploaddate() )

    Thanks!

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You could do this by having the script creating a new file and copying itself into it, then checking the date of creation.

    However, the main thing here is that JavaScript is unsuitable for this since it doesn't operate on the server. You'd need something like PHP or ASP.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •