* fixed some php fatal error on spells page

* changed spells.vocations field in db size to 300
* please reload your spells after this update!
This commit is contained in:
slawkens1
2017-10-22 23:36:05 +02:00
parent 2b6d65e955
commit 87a3d1e5d1
4 changed files with 18 additions and 15 deletions

View File

@@ -11,29 +11,27 @@
defined('MYAAC') or die('Direct access not allowed!');
class Usage_Statistics {
private static $report_url = 'http://my-aac.org/report_usage.php';
public static function report() {
$url = 'http://my-acc.org/report_usage.php';
//$url = BASE_URL . 'report_usage.php';
$data = json_encode(self::getStats());
$options = array(
'http' => array(
'header' => 'Content-type: application/json',
'header' => 'Content-type: application/json' . "\r\n"
. 'Content-Length: ' . strlen($data) . "\r\n",
'method' => 'POST',
'content' => $data
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === false) {
return false;
}
return true;
$result = file_get_contents(self::$report_url, false, $context);
//var_dump($result);
return $result !== false;
}
public static function getStats() {
global $config, $db;