CleantalkHelper
in package
Table of Contents
Properties
- $cdn_pool : mixed
- $private_networks : mixed
Methods
- arrayToUTF8() : array<string|int, mixed>
- Function convert array to UTF8 and removes non UTF8 characters param array param string
- http__request() : mixed
- Function sends raw http request
- ip_get() : mixed
- ip_mask_match() : mixed
- ip_validate() : mixed
- is_json() : bool
- Checks if the string is JSON type
- removeNonUTF8FromArray() : mixed
- Function removing non UTF8 characters from array||string
- removeNonUTF8FromString() : mixed
- Function removing non UTF8 characters from array||string param mixed(array||string) return mixed(array||string)
- stringFromUTF8() : string
- Function convert string from UTF8 param string param string
- stringToUTF8() : string
- Function convert string to UTF8 and removes non UTF8 characters param string param string
Properties
$cdn_pool
private
static mixed
$cdn_pool
= array('cloud_flare' => array('ipv4' => array(
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'104.16.0.0/12',
'108.162.192.0/18',
'131.0.72.0/22',
'141.101.64.0/18',
'162.158.0.0/15',
'172.64.0.0/13',
'173.245.48.0/20',
'185.93.231.18/20',
// User fix
'185.220.101.46/20',
// User fix
'188.114.96.0/20',
'190.93.240.0/20',
'197.234.240.0/22',
'198.41.128.0/17',
), 'ipv6' => array('2400:cb00::/32', '2405:8100::/32', '2405:b500::/32', '2606:4700::/32', '2803:f800::/32', '2c0f:f248::/32', '2a06:98c0::/29')))
$private_networks
private
static mixed
$private_networks
= array('10.0.0.0/8', '100.64.0.0/10', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.1/32')
Methods
arrayToUTF8()
Function convert array to UTF8 and removes non UTF8 characters param array param string
public
static arrayToUTF8(mixed $array[, mixed $data_codepage = null ]) : array<string|int, mixed>
Parameters
- $array : mixed
- $data_codepage : mixed = null
Return values
array<string|int, mixed>http__request()
Function sends raw http request
public
static http__request(mixed $url[, mixed $data = array() ][, mixed $presets = null ][, mixed $opts = array() ]) : mixed
May use 4 presets(combining possible): get_code - getting only HTTP response code dont_wait_for_answer - async requests get - GET-request ssl - use SSL
Parameters
- $url : mixed
- $data : mixed = array()
- $presets : mixed = null
- $opts : mixed = array()
Return values
mixed —(array || array('error' => true))
ip_get()
public
static ip_get([mixed $ips_input = array('real', 'remote_addr', 'x_forwarded_for', 'x_real_ip', 'cloud_flare') ][, mixed $v4_only = true ]) : mixed
Parameters
- $ips_input : mixed = array('real', 'remote_addr', 'x_forwarded_for', 'x_real_ip', 'cloud_flare')
- $v4_only : mixed = true
ip_mask_match()
public
static ip_mask_match(mixed $ip, mixed $cidr) : mixed
Parameters
- $ip : mixed
- $cidr : mixed
ip_validate()
public
static ip_validate(mixed $ip) : mixed
Parameters
- $ip : mixed
is_json()
Checks if the string is JSON type
public
static is_json(mixed $string) : bool
Parameters
- $string : mixed
Return values
boolremoveNonUTF8FromArray()
Function removing non UTF8 characters from array||string
public
static removeNonUTF8FromArray(mixed $data) : mixed
Parameters
- $data : mixed
Tags
removeNonUTF8FromString()
Function removing non UTF8 characters from array||string param mixed(array||string) return mixed(array||string)
public
static removeNonUTF8FromString(mixed $data) : mixed
Parameters
- $data : mixed
stringFromUTF8()
Function convert string from UTF8 param string param string
public
static stringFromUTF8(mixed $str[, mixed $data_codepage = null ]) : string
Parameters
- $str : mixed
- $data_codepage : mixed = null
Return values
stringstringToUTF8()
Function convert string to UTF8 and removes non UTF8 characters param string param string
public
static stringToUTF8(mixed $str[, mixed $data_codepage = null ]) : string
Parameters
- $str : mixed
- $data_codepage : mixed = null