get_class_name()
get_class_name() : object
Method get_class_name()
Get Class Name.
Returns
object —Class name.
Class MainWP_Connect
try_visit(string $url, boolean $ssl_verifyhost = null, string $http_user = null, string $http_pass = null, integer $sslVersion, boolean $forceUseIPv4 = null, boolean $no_body = false) : array
Method try visit.
Try connecting to Child Site via cURL.
string | $url | Child Site URL. |
boolean | $ssl_verifyhost | Option to check SSL Certificate. Default = null. |
string | $http_user | HTTPAuth Username. Default = null. |
string | $http_pass | HTTPAuth Password. Default = null. |
integer | $sslVersion | Child Site SSL Version. |
boolean | $forceUseIPv4 | Option to force IP4. Default = null. |
boolean | $no_body | Option to set CURLOPT_NOBODY option. Default = false. |
$out. 'host IP, Returned HTTP Code, Error Message, http Status error message.
get_post_data_authed(mixed $website, mixed $what, null $params = null) : mixed
Method get_post_data_authed()
Get authorized $_POST data & build query.
mixed | $website | Array of Child Site Info. |
mixed | $what | What we are posting. |
null | $params | Post parameters. |
null|http_build_query()
get_get_data_authed(mixed $website, mixed $paramValue, string $paramName = 'where', boolean $asArray = false, array $other_params = array()) : string
Method get_get_data_authed()
Get authorized $_GET data & build query.
mixed | $website | Child Site data. |
mixed | $paramValue | OpenSSL parameter. |
string | $paramName | Parameter name. |
boolean | $asArray | true|false Default is false. |
array | $other_params | other params. |
$url
connect_sign(string $data, string $signature, string $privkey, mixed $algorithm) : boolean
Method connect_sign()
Sign connect.
string | $data | Data sign. |
string | $signature | signature. |
string | $privkey | Private key. |
mixed | $algorithm | signature algorithm. |
Success or not.
get_post_data_not_authed(mixed $url, mixed $admin, mixed $what, null $params = null) : mixed
Method get_post_data_not_authed()
Get not authorized $_POST data.
mixed | $url | Child site URL. |
mixed | $admin | Admin Username. |
mixed | $what | What function to perform. |
null | $params | Function parameters. |
null|http_build_query()
fetch_urls_authed(object $websites, string $what, array $params, mixed $handler, mixed $output, mixed $whatPage = null, array $others = array()) : boolean
Method fetch_urls_authed()
Fetch authorized URLs.
object | $websites | Websites information. |
string | $what | Action to perform. |
array | $params | Request parameters. |
mixed | $handler | Request handler. |
mixed | $output | Request output. |
mixed | $whatPage | Request URL. Default /admin-ajax.php. |
array | $others | Request additional information. |
true|false
fetch_url_authed(object $website, string $what, null $params = null, boolean $checkConstraints = false, boolean $pForceFetch = false, boolean $pRetryFailed = true, null $rawResponse = null) : mixed
Method fetch_url_authed()
Updates the child site via authenticated request.
object | $website | Website information. |
string | $what | Function to perform. |
null | $params | Function parameters. |
boolean | $checkConstraints | Whether or not to check constraints. |
boolean | $pForceFetch | Whether or not to force the fetch. |
boolean | $pRetryFailed | Whether or not to retry the fetch process. |
null | $rawResponse | Raw response. |
$information
fetch_url_not_authed(string $url, string $admin, string $what, null $params = null, boolean $pForceFetch = false, null $verifyCertificate = null, null $http_user = null, null $http_pass = null, integer $sslVersion, array $others = array(), array $output = array()) : mixed
Method fetch_url_not_authed()
Fetch not authorized URL.
string | $url | URL to fetch from. |
string | $admin | Admin name. |
string | $what | Function to perform. |
null | $params | Function parameters. |
boolean | $pForceFetch | true|false Whether or not to force the fetch. |
null | $verifyCertificate | Verify the SSL Certificate. |
null | $http_user | htaccess username. |
null | $http_pass | htaccess password. |
integer | $sslVersion | SSL version to check for. |
array | $others | Other functions to perform. |
array | $output | Output values. |
self::fetch_url() Fetch URL.
fetch_url(object $website, string $url, mixed $postdata, boolean $checkConstraints = false, null $verifyCertificate = null, boolean $pRetryFailed = true, null $http_user = null, null $http_pass = null, integer $sslVersion, array $others = array(), array $output = array()) : mixed
Method fetch_url()
Fetch URL.
object | $website | Child Site info. |
string | $url | URL to fetch from. |
mixed | $postdata | Post data to fetch. |
boolean | $checkConstraints | true|false Whether or not to check constraints. |
null | $verifyCertificate | Verify SSL Certificate. |
boolean | $pRetryFailed | ture|false Whether or not the Retry has failed. |
null | $http_user | htaccess username. |
null | $http_pass | htaccess password. |
integer | $sslVersion | SSL version. |
array | $others | Other functions to perform. |
array | $output | Output values. |
Exception message.
self::fetch_url_site()
fetch_url_site(object $website, string $url, mixed $postdata, boolean $checkConstraints = false, null $verifyCertificate = null, null $http_user = null, null $http_pass = null, integer $sslVersion, array $others = array(), array $output = array()) : mixed
Method fetch_url_site()
M Fetch URL.
object | $website | Child Site info. |
string | $url | URL to fetch from. |
mixed | $postdata | Post data to fetch. |
boolean | $checkConstraints | true|false Whether or not to check constraints. |
null | $verifyCertificate | Verify SSL Certificate. |
null | $http_user | htaccess username. |
null | $http_pass | htaccess password. |
integer | $sslVersion | SSL version. |
array | $others | Other functions to perform. |
array | $output | Output values. |
Exception message.
$data, $information.
download_to_file(mixed $url, mixed $file, boolean $size = false, null $http_user = null, null $http_pass = null)
Method download_to_file()
Download to file.
mixed | $url | Download URL. |
mixed | $file | File to download to. |
boolean | $size | Size of file. |
null | $http_user | htaccess username. |
null | $http_pass | htaccess password. |
Exception message.
get_renew_post_data_authed(mixed $website, mixed $what) : mixed
Method get_renew_post_data_authed()
Get authorized $_POST data & build query for renew connection action only.
mixed | $website | Array of Child Site Info. |
mixed | $what | What we are posting. |
null|http_build_query()
check_constraints_last_request(mixed $identifier, integer $minimumDelay, string|null $ip = null)
Method check_constraints_last_request().
Check constraints for last requests.
mixed | $identifier | connect identifier. |
integer | $minimumDelay | minimum delay. |
string|null | $ip | ip address. |
check_constraints_open_requests(mixed $identifier, integer $maximumRequests, string|null $ip = null)
Method check_constraints_open_requests().
Check constraints for open requests.
mixed | $identifier | connect identifier. |
integer | $maximumRequests | maximum requests. |
string|null | $ip | ip address. |