use client?s mimetype as fallback for uploads
This commit is contained in:
commit
a75696e4e7
3468 changed files with 596986 additions and 0 deletions
32
www/analytics/misc/others/api_internal_call.php
Normal file
32
www/analytics/misc/others/api_internal_call.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
use Piwik\API\Request;
|
||||
use Piwik\FrontController;
|
||||
|
||||
define('PIWIK_INCLUDE_PATH', realpath('../..'));
|
||||
define('PIWIK_USER_PATH', realpath('../..'));
|
||||
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('
|
||||
module=API
|
||||
&method=UserSettings.getResolution
|
||||
&idSite=7
|
||||
&date=yesterday
|
||||
&period=week
|
||||
&format=XML
|
||||
&filter_limit=3
|
||||
&token_auth=anonymous
|
||||
');
|
||||
// Calls the API and fetch XML data back
|
||||
$result = $request->process();
|
||||
echo $result;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue