/* $Id$ */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
+#define HTTP_WANT_SAPI
#define HTTP_WANT_CURL
#define HTTP_WANT_ZLIB
#include "php_http.h"
-#include "SAPI.h"
#include "php_ini.h"
-#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
#include "zend_operators.h"
* Compose a valid HTTP date regarding RFC 822/1123
* looking like: "Wed, 22 Dec 2004 11:34:47 GMT"
*
- * Takes an optional unix timestamp as parameter.
- *
+ * Accepts an optional unix timestamp as parameter.
+ *
* Returns the HTTP date as string.
*/
PHP_FUNCTION(http_date)
}
if (t == -1) {
- t = (long) time(NULL);
+ t = (long) HTTP_GET_REQUEST_TIME();
}
RETURN_STRING(http_date(t), 0);
}
if (t == -1) {
- t = (long) time(NULL);
+ t = (long) HTTP_GET_REQUEST_TIME();
}
RETURN_SUCCESS(http_send_last_modified(t));
// current time if not supplied (senseless though)
if (t == -1) {
- t = (long) time(NULL);
+ t = (long) HTTP_GET_REQUEST_TIME();
}
if (for_range) {
HTTP_CHECK_HEADERS_SENT(RETURN_FALSE);
- t = (long) time(NULL);
+ t = (long) HTTP_GET_REQUEST_TIME();
/* 0 or omitted */
if (!last_modified) {