$ip_address
$ip_address : string
IP address of the current user
Input Class
Pre-processes global input data for security
input_stream(string $index = NULL, boolean $xss_clean = NULL) : mixed
Fetch an item from the php://input stream
Useful when you need to access PUT, DELETE or PATCH request data.
string | $index | Index for item to be fetched |
boolean | $xss_clean | Whether to apply XSS filtering |
set_cookie(string|array<mixed,mixed> $name, string $value = '', integer $expire = '', string $domain = '', string $path = '/', string $prefix = '', boolean $secure = NULL, boolean $httponly = NULL) : void
Set cookie
Accepts an arbitrary number of parameters (up to 7) or an associative array in the first parameter containing all the values.
string|array<mixed,mixed> | $name | Cookie name or an array containing parameters |
string | $value | Cookie value |
integer | $expire | Cookie expiration time in seconds |
string | $domain | Cookie domain (e.g.: '.yourdomain.com') |
string | $path | Cookie path (default: '/') |
string | $prefix | Cookie name prefix |
boolean | $secure | Whether to only transfer cookies via SSL |
boolean | $httponly | Whether to only makes the cookie accessible via HTTP (no javascript) |
get_request_header(string $index, boolean $xss_clean = FALSE) : string|null
Get Request Header
Returns the value of a single member of the headers class member
string | $index | Header name |
boolean | $xss_clean | Whether to apply XSS filtering |
The requested header on success or NULL on failure
method(boolean $upper = FALSE) : string
Get Request Method
Return the request method
boolean | $upper | Whether to return in upper or lower case (default: FALSE) |
None found |
__get(string $name) : mixed
Magic __get()
Allows read access to protected properties
string | $name |
None found |
_fetch_from_array( $array, mixed $index = NULL, boolean $xss_clean = NULL) : mixed
Fetch from array
Internal method used to retrieve values from global arrays.
$array | ||
mixed | $index | Index for item to be fetched from $array |
boolean | $xss_clean | Whether to apply XSS filtering |
None found |
_sanitize_globals() : void
Sanitize Globals
Internal method serving for the following purposes:
None found |
_clean_input_data(string|array<mixed,string> $str) : string
Clean Input Data
Internal method that aids in escaping data and standardizing newline characters to PHP_EOL.
string|array<mixed,string> | $str | Input string(s) |
None found |
_clean_input_keys(string $str, boolean $fatal = TRUE) : string|boolean
Clean Keys
Internal method that helps to prevent malicious users from trying to exploit keys we make sure that keys are only named with alpha-numeric text and a few other items.
string | $str | Input string |
boolean | $fatal | Whether to terminate script exection or to return FALSE if an invalid key is encountered |
None found |