summaryrefslogtreecommitdiff
path: root/main/SAPI.h
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2004-08-10 17:40:00 +0000
committerRasmus Lerdorf <rasmus@php.net>2004-08-10 17:40:00 +0000
commitcad60c3760b7c858b3280ad1f1b9ea9f4187c710 (patch)
tree89469c25e0b12dd8a59e7561f9338db4da0dd842 /main/SAPI.h
parent426443cc183a1a31b4fe70caa649ecac390e245a (diff)
downloadphp-git-cad60c3760b7c858b3280ad1f1b9ea9f4187c710.tar.gz
Add SAPI hook to get the request time if provided by the web server,
otherwise call time(0) on the first call and store it so subsequent calls will get the same time. Hook support for Apache1/2 included.
Diffstat (limited to 'main/SAPI.h')
-rw-r--r--main/SAPI.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/SAPI.h b/main/SAPI.h
index d740eb9061..32e69d2e8e 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -122,6 +122,7 @@ typedef struct _sapi_globals_struct {
long post_max_size;
int options;
zend_bool sapi_started;
+ time_t global_request_time;
} sapi_globals_struct;
@@ -197,6 +198,7 @@ SAPI_API int sapi_force_http_10(TSRMLS_D);
SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC);
SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC);
+SAPI_API time_t sapi_get_request_time(TSRMLS_D);
END_EXTERN_C()
struct _sapi_module_struct {
@@ -225,6 +227,7 @@ struct _sapi_module_struct {
void (*register_server_variables)(zval *track_vars_array TSRMLS_DC);
void (*log_message)(char *message);
+ time_t (*get_request_time)(TSRMLS_D);
char *php_ini_path_override;