<?php

require('include/class.php');

include('include/common.php');
include('include/common.php');

echo html_simple_page("Your address is <b>" . \Core\Access::getRemoteAddress() . "</b>");

die;

$const = get_defined_constants(true);
print_r($const['user']);
die;

$Api = new \Service\Api();

//$Api->route = json_decode(@file_get_contents("include/config/route.json"), true);

$Api->route->add("POST", "/user/{id}", 'post_user_data');

$Api->route->add("GET", '/user/{id}', function() { return "!"; });
//$Api->route["GET"]['/geo/{longitude}/{latitude}'] = function() { return "!"; };


file_put_contents("include/config/route.json", json_encode($Api->route, true));

echo @file_get_contents("include/config/route.json", true);
