#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    0

    Get file date http


    I would get last modified and creation date of a file over http.
    I have direct link of that file
    Suggestions?


    I made by myself.
    You need to drag TIdHTTP Indy componet into form then get information from http headers with the following code

    IdHTTP1.Head(URL);

    IdHTTP1.Response.Date;

    or

    IdHTTP1.Response.LastModified;
    Last edited by ASAP; October 9th, 2012 at 05:00 AM. Reason: add
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    122
    Rep Power
    0

    Solutions of the problem.


    Hi

    Please find the answer your question.
    Here is some source code
    IdHTTP1.Head(URL);
    ShowMessage(DateTimeToStr(IdHTTP1.Response.Date));
    ShowMessage(DateTimeToStr(IdHTTP1.Response.LastModified));

    Date function return current date and time of your system. LastModified returns when your page updated last time.

    Thanks
    diya

    Comments on this post

    • ASAP agrees : Thanks

IMN logo majestic logo threadwatch logo seochat tools logo