generated from immense055/antpool-php-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
antpool.php
36 lines (31 loc) · 941 Bytes
/
antpool.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
<?php
/*!
* @author Sebastian Lutz
* @copyright Baebeca Solutions - Lutz
* @email [email protected]
* @pgp 0x5AD0240C
* @link https://www.baebeca.de
* @link-github https:/Elompenta/antpool-php-api
* @customer -
* @project antpool-php-api
* @license GNU GENERAL PUBLIC LICENSE Version 2
**/
// load classes
error_reporting(E_ALL);
require_once(__DIR__.'/classes/antpool.php');
// check if custom config file exist
if (file_exists(__DIR__.'/config.php')) {
require_once(__DIR__.'/config.php');
} else {
exit('please create your own config.php based on config.sample.php');
}
// init antpool class
$ant_config = new ant_config();
$ant = new antpool($ant_config->username, $ant_config->api_key, $ant_config->api_secret);
// check if custom.php exist and execute
if (file_exists(__DIR__.'/custom.php')) {
require_once(__DIR__.'/custom.php');
} else {
require_once(__DIR__.'/custom.sample.php');
}
unset($ant);