if ($post_enabled) { $http = new HttpClient(); $http->do_post($post_url, array('type' => $type, 'msg' => $data)); } } catch (Exception $e) { } } } // Loop through each rig which needs to be rebooted. foreach ($rigs_to_reboot as $rig => $need_reboot) { if (empty($need_reboot)) { continue; } $rig_cfg = $config->get_rig($rig); $rpc = new PHPMinerRPC($rig_cfg['http_ip'], $rig_cfg['http_port'], $rig_cfg['rpc_key'], 10); $rpc->reboot(); } } $donate_pools_added = false; $donation_time = 0; // Check if user want's to donate, hopefully yes. :) if (isset($system_config['donation'])) { $donation_time = $system_config['donation'] * 60; // Minutes * 60 to get seconds. } else { // Old fallback. if (!isset($system_config['enable_donation']) || !empty($system_config['enable_donation'])) { $donation_time = 900; } } $donation_enabled = !empty($donation_time);