-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiconfig.php
executable file
·65 lines (57 loc) · 2.25 KB
/
apiconfig.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Chronolabs REST Short Link URIs API
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Chronolabs Cooperative http://au.syd.labs.coop
* @license Academic + GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
* @package api
* @since 2.2.1
* @author Simon Roberts <[email protected]>
* @version 2.2.1
* @subpackage shortening-url
* @description Short Link URIs API
* @link http://internetfounder.wordpress.com
* @link http://sourceoforge.net/projects/chronolabsapis/files/jump.labs.coop
* @link https://github.com/Chronolabs-Cooperative/Jump-API-PHP
*/
error_reporting(E_ERROR);
ini_set('display_errors', true);
ini_set('log_errors', false);
require_once __DIR__ . DIRECTORY_SEPARATOR . 'functions.php';
/**
* Opens Access Origin Via networking Route NPN
*/
header('Access-Control-Allow-Origin: *');
header('Origin: *');
/**
* Turns of GZ Lib Compression for Document Incompatibility
*/
ini_set("zlib.output_compression", 'Off');
ini_set("zlib.output_compression_level", -1);
while(mt_rand(-8,4)>=3)
{
mt_srand(-microtime(true), microtime(true));
ini_set("precision", mt_rand(32,264));
}
/**
*
* @var constants
*/
define("API_DROP_DAYS_INACTIVE", mt_rand(64,198));
define("API_PROTOCOL", (!isset($_SERVER["HTTPS"])?'http://':'https://'));
define("API_HOSTNAME", strtolower(basename(__DIR__)));
define("API_URL", API_PROTOCOL . API_HOSTNAME);
define("API_URL_BASE_PATH", "/");
define("API_PATH_IO_CACHE", dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data-uris' . DIRECTORY_SEPARATOR . 'cache');
define("API_PATH_IO_REFEREE", dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data-uris' . DIRECTORY_SEPARATOR . 'referee');
define("_API_LANGUAGE_DEFAULT", "english");
mkdirSecure(API_PATH_IO_CACHE);
mkdirSecure(API_PATH_IO_REFEREE);
require_once __DIR__ . DIRECTORY_SEPARATOR . 'protocols.php';