Unofficial SMF API Documentation

./Sources/QueryString.php

cleanRequest

function cleanRequest(): void

Clean the request variables - add html entities to GET and slashes if magic_quotes_gpc is Off.

What it does:

isValidIPv6

function isValidIPv6(string $ip): bool

Validates a IPv6 address. returns true if it is ipv6.

Type Parameter Description
string $ip The ip address to be validated

expandIPv6

function expandIPv6(string $addr, bool $strict_check = true): string|bool

Expands a IPv6 address to its full form.

Type Parameter Description
string $addr The IPv6 address
bool $strict_check Whether to check the length of the expanded address for compliance

matchIPtoCIDR

function matchIPtoCIDR(string $ip_address, string $cidr_address): bool

Detect if a IP is in a CIDR address

Type Parameter Description
string $ip_address IP address to check
string $cidr_address CIDR address to verify

escapestring__recursive

function escapestring__recursive(array|string $var): array|string

Adds slashes to the array/variable.

What it does:

Type Parameter Description
array|string $var A string or array of strings to escape

htmlspecialchars__recursive

function htmlspecialchars__recursive(array|string $var, int $level = 0): array|string

Adds html entities to the array/variable. Uses two underscores to guard against overloading.

What it does:

Type Parameter Description
array|string $var The string or array of strings to add entites to
int $level Which level we’re at within the array (if called recursively)

urldecode__recursive

function urldecode__recursive(array|string $var, int $level = 0): array|string

Removes url stuff from the array/variable. Uses two underscores to guard against overloading.

What it does:

Type Parameter Description
array|string $var The string or array of strings to decode
int $level Which level we’re at within the array (if called recursively)

unescapestring__recursive

function unescapestring__recursive(array|string $var): array|string

Unescapes any array or variable. Uses two underscores to guard against overloading.

What it does:

Type Parameter Description
array|string $var The string or array of strings to unescape

stripslashes__recursive

function stripslashes__recursive(array|string $var, int $level = 0): array|string

Remove slashes recursively. Uses two underscores to guard against overloading.

What it does:

Type Parameter Description
array|string $var The string or array of strings to strip slashes from
int $level = 0 What level we’re at within the array (if called recursively)

htmltrim__recursive

function htmltrim__recursive(array|string $var, int $level = 0): array|string

Trim a string including the HTML space, character 160. Uses two underscores to guard against overloading.

What it does:

Type Parameter Description
array|string $var The string or array of strings to trim
int $level = 0 How deep we’re at within the array (if called recursively)

ob_sessrewrite

function ob_sessrewrite(string $buffer): string

Rewrite URLs to include the session ID.

What it does:

Type Parameter Description
string $buffer The unmodified output buffer

Suggest an edit to this page on GitHub