この方法で実行しようとしましたが、次のエラーが発生します。
Fatal error: Class 'Piwik_FrontController' not found in C:\wamp\www\aqar2\piwik.php on line 11
私のウェブサイトのパスは:localhost/aqar2
私の piwik のパスは:localhost/aqar2/piwik
<?php
// if you don't include 'index.php', you must also define PIWIK_DOCUMENT_ROOT
// and include "libs/upgradephp/upgrade.php" and "core/Loader.php"
define('PIWIK_INCLUDE_PATH', realpath('.localhost/aqar2/.'));
define('PIWIK_USER_PATH', realpath('.localhost/aqar2/.'));
define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false);
require_once PIWIK_INCLUDE_PATH . "piwik/index.php";
require_once PIWIK_INCLUDE_PATH . "piwik/core/API/Request.php";
Piwik_FrontController::getInstance()->init();
// This inits the API Request with the specified parameters
$request = new Piwik_API_Request('
method=UserSettings.getResolution
&idSite=1
&date=yesterday
&period=week
&format=XML
&filter_limit=3
&token_auth=&token_auth=a688c5c011dac27cf125eaa84f95e59b
');
// Calls the API and fetch XML data back
$result = $request->process();
echo $result;
?>