File "troubleshooting-connectivity.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/unlimited-elements-for-elementor/views/troubleshooting-connectivity.php
File size: 1.5 B
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<h1>Unlimited Elements - API Access Test</h1>

<br>

<?php 
function checkZipFile()
{
    $urlAPI = GlobalsUC::URL_API;
    $arrPost = array("action" => "get_addon_zip", "name" => "team_member_box_overlay", "cat" => "Team Members", "type" => "addons", "catalog_date" => "1563618449", "code" => "");
    dmp("requesting widget zip from API");
    $response = UniteFunctionsUC::getUrlContents($urlAPI, $arrPost);
    if (empty($response)) {
        UniteFunctionsUC::throwError("Empty server response");
    }
    $len = strlen($response);
    dmp("api response OK, recieve string size: {$len}");
}
function checkCatalogRequest()
{
    $urlAPI = GlobalsUC::URL_API;
    $arrPost = array("action" => "check_catalog", "catalog_date" => "1563618449", "include_pages" => false, "domain" => "localhost", "platform" => "wp");
    dmp("requesting catalog check");
    $response = UniteFunctionsUC::getUrlContents($urlAPI, $arrPost);
    if (empty($response)) {
        UniteFunctionsUC::throwError("Empty server response");
    }
    $len = strlen($response);
    dmp("api response OK, recieve string size: {$len}");
}
function checkVariousOptions()
{
    dmp("checking file get contents");
    $urlAPI = GlobalsUC::URL_API;
    $response = file_get_contents($urlAPI);
    $len = strlen($response);
    dmp("file get contents OK, recieve string size: {$len}");
}
try {
    checkVariousOptions();
    echo "<br><br>";
    checkCatalogRequest();
    echo "<br><br>";
    checkZipFile();
} catch (Exception $e) {
    echo $e->getMessage();
}