PHP Doku:: Compose HTTP RFC compliant date - function.http-date.html

Verlauf / Chronik / History: (50) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteHTTPHTTP Funktionenhttp_date

Ein Service von Reinhard Neidl - Webprogrammierung.

Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
HTTP Funktionen

<<http_build_cookie

http_get_request_body_stream>>

http_date

(PECL pecl_http >= 0.1.0)

http_dateCompose HTTP RFC compliant date

Beschreibung

string http_date ([ int $timestamp ] )

Compose a valid HTTP date regarding RFC 1123 looking like: Wed, 22 Dec 2004 11:34:47 GMT.

Parameter-Liste

timestamp

Unix timestamp; current time if omitted

Rückgabewerte

Returns the HTTP date as string.

Siehe auch

  • date() - Formatiert ein(e) angegebene(s) Ortszeit/Datum


Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
Ein BenutzerBeitrag:
- Beiträge aktualisieren...
joshsnyder at earthlink dot net
21.09.2008 1:41
Not sure if this is a failure of documentation or a bug, but it is worth noting that this function seems to return the timestamp of the script execution by default, not the current time. So e.g. this:

<?php

echo http_date();
sleep(60);
echo
http_date();

?>

will output the exact same string twice.



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)