Documentation

Cleantalk
in package

Cleantalk class create request

Table of Contents

Properties

$api_version  : string
API version to use
$data_codepage  : bool
Codepage of the data
$max_server_timeout  : mixed
Maximal server response in miliseconds to catch the server
$min_server_timeout  : mixed
Minimal server response in miliseconds to catch the server
$sender_email  : string
Checked Email
$sender_ip  : string
Checked IP
$server_change  : bool
Flag is change server url
$server_changed  : int
Time wotk_url changer
$server_ttl  : int
WOrk url ttl
$server_url  : string
Cleantalk server url
$ssl_on  : bool
Use https connection to servers
$ssl_path  : string
Path to SSL certificate
$work_url  : string
Last work url
$compressRate  : int
Data compression rate
$dataMaxSise  : int
Maximum data size in bytes
$server_timeout  : int
Server connection timeout in seconds

Methods

isAllowMessage()  : CleantalkResponse
Function checks whether it is possible to publish the message
isAllowUser()  : CleantalkResponse
Function checks whether it is possible to publish the message
sendFeedback()  : CleantalkResponse
Function sends the results of manual moderation
compressData()  : string
Compress data and encode to base64
createMsg()  : CleantalkRequest
Create msg for cleantalk server
filterRequest()  : CleantalkRequest
Filter request params
get_servers_ip()  : array<string|int, mixed>
Function DNS request
httpPing()  : int
Function to check response time param string
httpRequest()  : CleantalkResponse
httpRequest
sendRequest()  : bool|CleantalkResponse
Send JSON request to servers

Properties

$api_version

API version to use

public string $api_version = '/api2.0'

$data_codepage

Codepage of the data

public bool $data_codepage = null

$max_server_timeout

Maximal server response in miliseconds to catch the server

public mixed $max_server_timeout = 1500

$min_server_timeout

Minimal server response in miliseconds to catch the server

public mixed $min_server_timeout = 50

$sender_email

Checked Email

public string $sender_email = null

$sender_ip

Checked IP

public string $sender_ip = null

$server_change

Flag is change server url

public bool $server_change = false

$server_changed

Time wotk_url changer

public int $server_changed = null

$server_ttl

WOrk url ttl

public int $server_ttl = null

$server_url

Cleantalk server url

public string $server_url = null

$ssl_on

Use https connection to servers

public bool $ssl_on = false

$ssl_path

Path to SSL certificate

public string $ssl_path = ''

$work_url

Last work url

public string $work_url = null

$compressRate

Data compression rate

private int $compressRate = 6

$dataMaxSise

Maximum data size in bytes

private int $dataMaxSise = 32768

$server_timeout

Server connection timeout in seconds

private int $server_timeout = 15

Methods

compressData()

Compress data and encode to base64

private compressData([mixed $data = null ]) : string
Parameters
$data : mixed = null
Return values
string

get_servers_ip()

Function DNS request

private get_servers_ip(mixed $host) : array<string|int, mixed>
Parameters
$host : mixed
Return values
array<string|int, mixed>

httpPing()

Function to check response time param string

private httpPing(mixed $host) : int
Parameters
$host : mixed
Return values
int

sendRequest()

Send JSON request to servers

private sendRequest(mixed $data, mixed $url[, int $server_timeout = 3 ]) : bool|CleantalkResponse
Parameters
$data : mixed
$url : mixed
$server_timeout : int = 3
Return values
bool|CleantalkResponse

        
On this page

Search results