Dotclear 2.24
|
HTTP utilities. More...
Static Public Member Functions | |
static | getHost () |
static | getHostFromURL (string $url) |
static | getSelfURI () |
static | redirect (string $relative_url) |
static | concatURL (string $url, string $path) |
static | realIP () |
static | browserUID (string $key) |
static | getAcceptLanguage () |
static | getAcceptLanguages () |
static | cache (array $mod_files, array $mod_timestamps=[]) |
static | etag (... $args) |
static | head (int $code, $msg=null) |
static | trimRequest () |
Static Public Attributes | |
static | $https_scheme_on_443 = false |
static | $cache_max_age = 0 |
static | $reverse_proxy = false |
Static Protected Member Functions | |
static | prepareRedirect (string $relative_url) |
HTTP utilities.
|
static |
Self root URI
Returns current scheme, host and port.
Referenced by getSelfURI(), adminAuth\init(), prepareRedirect(), and testGetHost().
|
static |
Self root URI
Returns current scheme and host from a static URL.
string | $url | URL to retrieve the host from. |
Referenced by dcBlog\__construct(), and testGetHostFromURL().
|
static |
Self URI
Returns current URI with full hostname.
References getHost().
Referenced by testGetSelfURI().
|
staticprotected |
Prepare a full redirect URI from a relative or absolute URL
string | $relative_url | Relative URL |
References getHost().
|
static |
Redirect
Performs a conforming HTTP redirect for a relative URL.
string | $relative_url | Relative URL |
References exit.
Referenced by dcPage\check(), dcPage\checkSuper(), dcModules\disableDepModules(), dcFilterAkismet\gui(), dcFilterIP\gui(), dcFilterIpLookup\gui(), dcFilterIPv6\gui(), dcFilterWords\gui(), dcImportDC1\guiprocess(), dcImportWP\guiprocess(), adminUpdate\init(), dcAdmin\init(), adminComment\process(), adminPostMedia\process(), adminUpdate\process(), adminUsersActions\process(), adminAboutConfig\process(), adminAntispam\process(), adminBlogrollEdit\process(), adminBlogroll\process(), adminBlowupConfig\process(), adminCKEditor\process(), adminLegacyEditor\process(), adminMaintenance\process(), adminPage\process(), adminPings\process(), adminSimpleMenu\process(), adminTag\process(), adminThemeEditor\process(), adminUserPreferences\process(), dcExportFlat\process(), dcImportFeed\process(), dcImportFlat\process(), dcActions\redirect(), and dcAdminURL\redirect().
|
static |
Concat URL and path
Appends a path to a given URL. If path begins with "/" it will replace the original URL path.
string | $url | URL |
string | $path | Path to append |
Referenced by dcStore\check(), adminConfigThemeDuctile\init(), adminBlowupConfig\render(), and testConcatURL().
|
static |
Real IP
Returns the real client IP (or tries to do its best).
Referenced by dcBlog\addComment(), akismet\callFunc(), urlPages\pages(), and testRealIP().
|
static |
Client unique ID
Returns a "almost" safe client unique ID.
string | $key | HMAC key |
References crypt\hmac().
Referenced by dcAuth\checkSession(), dcAuth\checkUser(), adminAuth\process(), adminPost\render(), adminPage\render(), and testBrowserUID().
|
static |
Client language
Returns a two letters language code take from HTTP_ACCEPT_LANGUAGE.
Referenced by adminAuth\init(), and testGetAcceptLanguage().
|
static |
Client languages
Returns an array of accepted langages ordered by priority. can be a two letters language code or a xx-xx variant.
Referenced by testGetAcceptLanguages().
|
static |
HTTP Cache
Sends HTTP cache headers (304) according to a list of files and an optionnal. list of timestamps.
array | $mod_files | Files on which check mtime |
array | $mod_timestamps | List of timestamps |
Referenced by adminBlogTheme\process(), testCache(), and urlBlogroll\xbel().
|
static |
HTTP Etag
Sends HTTP cache headers (304) according to a list of etags in client request.
Referenced by testEtag().
|
static |
HTTP Header
Sends an HTTP code and message to client.
int | $code | HTTP code |
string | $msg | Message |
References $code.
Referenced by cache(), etag(), adminXMLRPCpage\init(), dcAdmin\init(), urlPages\pages(), dcTrackback\receiveTrackback(), dcTrackback\receiveWebmention(), and testHead().
|
static |
Trim request
Trims every value in GET, POST, REQUEST and COOKIE vars. Removes magic quotes if magic_quote_gpc is on.
|
static |
Referenced by testGetHost().
|
static |
|
static |