cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Check last updated

From: Michael Shuler <michael_at_unixtx.com>
Date: Fri, 01 Oct 2004 10:44:16 -0500

Jonas Söderqvist wrote:
> Dose anybody know how to check when a php or asp was last updated?

In the curl man page, there appears to be a couple of promising options
that you might utilize to check on the timestamp of the remote file:

-R/--remote-time
      When used, this will make libcurl attempt to figure out the
timestamp of the remote file, and if that is available make the local
file get that same timestamp.

-z/--time-cond <date expression>
      (HTTP) Request to get a file that has been modified later than the
given time and date, or one that has been modified before that
time. The date expression can be all sorts of date strings or if it
doesn't match any internal ones, it tries to get the time from a given
file name instead! See the GNU date(1) or curl_getdate(3) man pages for
date expression details.

Kind Regards,
Michael Shuler
Received on 2004-10-01