Hi there,
What’s the problem: (Excuse me cannot describe more than)
<?php
use Piwik\API\Request;
use Piwik\FrontController;
define('PIWIK_INCLUDE_PATH', realpath('./piwik'));
define('PIWIK_USER_PATH', realpath('./piwik'));
define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false);
// if you prefer not to include 'index.php', you must also define here PIWIK_DOCUMENT_ROOT
// and include "libs/upgradephp/upgrade.php" and "core/Loader.php"
require_once PIWIK_INCLUDE_PATH . "/index.php";
require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php";
FrontController::getInstance()->init();
// This inits the API Request with the specified parameters
$request = new Request('
method=Actions.getPageTitle
&idSite=1
&date=today
&period=day
&format=XML
&token_auth=c0e024d9200b5705bc4804722636378a
');
// Calls the API and fetch XML data back
$result = $request->process();
echo $result;
?>
Error :