File "troubleshooting-api-access.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/unlimited-elements-for-elementor/views/troubleshooting-api-access.php
File size: 1.45 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" => "blox_particles_logo", "cat" => "Extras", "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);
    print_r("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);
    print_r("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>";
    echo "<br><br>";
} catch (Exception $e) {
    echo $e->getMessage();
}